-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex6.py
More file actions
22 lines (15 loc) · 797 Bytes
/
ex6.py
File metadata and controls
22 lines (15 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
types_of_people = 10 # 1 var
x = f'There are {types_of_people} types of people.' #format string inputinq 1 var
binary = 'binary' # 2 var
do_not = 'don\'t' # 3 var
y = f'Those who know {binary} and those who {do_not}.' #format string inputing 2 & 3 var, 1
print(x) # printing line 2
print(y) # printing line 6
print(f'I said: {x}') # format string inputing x var, 2
print(f'I also said: "{y}"') # format string inputing y var, 3
hilarious = False # var 4
joke_evaluation = 'Isn\'t that joke so funny?!, {}' # don't forget to put empty brackets for including var with var.format
print(joke_evaluation.format(hilarious)) #format string with var.format(var name), 4
w = 'This is a left side of...' # var w
e = 'a string with a right side.' # var e
print(w + e) # joining 2 strings with print