1
2
3
4
5
6
7
8
9
10
11
12
13
14
# variables are dynamically typed
x = 3
x = "three" # ok in Python
x = [1, 2, 3] # x is a list
y = x # both x and y refer to the same list
y.append(4) # appending to y impacts x as well
print(x)
s = "three"
# call upper, a member method of the string object
t = s.upper()
print(t)
Enter to Rename, Shift+Enter to Preview