-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperators.py
39 lines (30 loc) · 892 Bytes
/
operators.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Let's see the operators in action
a=24
b=16
# ## Introduction of Data Types and Operators
# - `+ - * /`
# ##### Comparison Operators
# - `>` greater than
# - `<` less than
# - `==` True or False
# - `>=` Greater than or equal
# - `<=` Less than or equal
# greeting="Hello WOrld!"
# print(greeting[-12:-6])
# print(greeting[0:5])
# use_var = string "abababna "
# white_space="lot's of spaces at the end "
# print(len(white_space))
# #strip() removes the white spaces at the end
# print(len(white_space.strip()))
# Example_text ="here's is sOme text with loT's of text"
# print(Example_text.count("text"))
# print(Example_text)
# print(Example_text.lower())
# print(Example_text.upper())
# print(Example_text.capitalize())
# print(Example_text.replace("with",","))
first_name ="Meghana"
last_name="Aenugu"
# user data input
print(f"Hello {first_name} {last_name} ")