a={}
a[2]=1
a[1]=[2,3,4]
print(a[1][1])
Which of the following is not a complex number?
The expression Int(x) implies that the variable x is converted to integer.
After how many seconds will the 'Hello' message be printed?
What will be the output of the following code?
for i in range(3):
if i == 1:
continue
print(i)
What will be the output of the following Python code snippet?
string = "my name is x"
for i in ' '.join(string.split()):
print (i, end=", ")
What will be the output of the following code?
class Rectangle:
pass
rect1 = Rectangle()
rect2 = Rectangle()
rect1.height = 20
rect2.height = 30
rect1.width = 40
rect2.width = 10
print(rect1.height * rect1.width)
print(rect2.height * rect2.width)
What is the most important benefit of writing your own functions?