What is the data type of (1)?
Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
Which of the following statements is used to create an empty set?
How many elements are in m?
m = [[x, y] for x in range(0, 4) for y in range(0, 4)]
To remove string "Abekus” from list, we use which command ?
What will be the output of the following Python code snippet?
a={1:"A",2:"B",3:"C"}
a.setdefault(4,"D")
print(a)
What is the output of the given code?
class A:
def __init__(self, id):
self.id = id
id = 555
a = A(111)
print a.id
class Sales:
def __init__(self, id):
self.id = id
id = 100
val = Sales(123)
print (val.id)