Quiz Catalog

Catalog of quizzes

a = [1, 2, 3]
b = a
del a

print(b)
[1, 2, 3]
  • statement/del

class Person:
  def __init__(hey, name, age):
  hey.name = name
  hey.age = age

  def my_age(abs):
  print("Hello my name is " + abs.age)

p1 = Person("John", 36)

del p1.age

p1.my_age()
AttributeError: 'Person' object has no attribute 'age'
  • statement/del
  • class/property

x = 10
y = 30
del x, y

print(x, y)
NameError: name 'x' is not defined
  • statement/del