-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex6.py
More file actions
27 lines (20 loc) · 738 Bytes
/
ex6.py
File metadata and controls
27 lines (20 loc) · 738 Bytes
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
types_of_people = 10
# Note: the f is required for variable interpolation
x = f"There are {types_of_people} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
print(f"I said: {x}")
# Note: single quotes are just for printing
# No difference between single and double quotes in python
print(f"I also said: '{y}'")
hilarious = False
# The {} is a placeholder for a print statement later where you can provide a variable
joke_evaluation = "Isn't that joke so funny?! {}"
# Now let's print the joke_evaluation with the variable hilarious
print(joke_evaluation.format(hilarious))
w = "This is the left side of..."
e = "a string with a right side."
print(w + e)