Assignment 1
Assignment 1
a=(1,2,3,4)
del a
A No because tuple is immutable
B Yes, the entire tuple is deleted
C Yes, first element in the tuple is deleted
D No, invalid syntax for del method
myList = [1, 2, 3]
print(myList[1])
A1
B2
C3
D Error
myList = [1, 2, 3]
myList.append(4)
print(myList)
A [1, 2, 3, 4]
B [1, 2, 3]
C [4, 3, 2, 1]
D Error
20.What will be the output of the following Python expression if x=15 and y=12?
z=x & y
print(z)
Select one:
A. 12
B. b1101
C. 0b1101
D. 1101