Quick Quiz!
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What will the output of the following snippet be?
class SomeClass:
some_list = [5]
def __init__(self, x):
self.some_list = self.some_list + [x]
some_obj = SomeClass(420)
another_obj = SomeClass(111)
print(some_obj.some_list, another_obj.some_list)
A.
[5, 420, 111] [5, 420, 111]
B.
[5, 420] [5, 111]
C.
[5, 420] [5, 420, 111]
D.
The snippet will throw an error
1 / 4