x = ‘hello’ Which method would produce ‘Hello’
Blog
print(4 e4) error 4000 40,000 40000
print(4 e4) error 4000 40,000 40000
Immutable values are like boxes that cannot be opened and ch…
Immutable values are like boxes that cannot be opened and changed – we can just see the value inside True False
True + 2 = 3 2 False True
True + 2 = 3 2 False True
list1 = [‘phone’, ‘wallet’, ‘keys’, ‘hat’] list1.insert(2, 2…
list1 = [‘phone’, ‘wallet’, ‘keys’, ‘hat’] list1.insert(2, 2) print(list1) [‘phone’, ‘wallet’, 2, ‘keys’, ‘hat’] error [‘phone’, ‘wallet’, ‘keys’, ‘hat’, ‘keys’] [‘phone’, ‘wallet’, ‘keys’, ‘hat’, ‘phone’, ‘wallet’, ‘keys’, ‘hat’]
dict1 = {‘cow’: 17, ‘chicken’: 88, ‘rooster’: 6} dict1[‘chic…
dict1 = {‘cow’: 17, ‘chicken’: 88, ‘rooster’: 6} dict1[‘chicken’] 88 error 6 17
type(7 + 1.1) float error int str
type(7 + 1.1) float error int str
x = 12 + 7 # print(x) 19 error x
x = 12 + 7 # print(x) 19 error x
names = ‘Captain America’, ”’T’Challa”’, ‘Carol Danvers’ t…
names = ‘Captain America’, ”’T’Challa”’, ‘Carol Danvers’ type(names) Note: ‘T’Challa’ is surrounded by double quotation marks tuple str error list
In Python, the name of your variable is just a reference to…
In Python, the name of your variable is just a reference to the object True False