hariselva | Feb. 11, 2020, 9:22 a.m.
Mutable objects:
list, dict, set, byte array
Immutable objects:
int, float, complex, string, tuple, frozen set [note: immutable version of set], bytes
Conditional loops:
If else statement:
var = x if condition else y
For loop:
for x in [1,2,3]:
print(x)
Output:
1
2
3
Single line print (Python 3):
for x in [1,2,3]:
print(x, end="")
Output:
1 2 3