Question #270

What it the output of the code snippet below?
my_set = {1, 2, 3, 4}
my_set.append(5)
print(my_set)

It will throw an AttributeError error. Sets don't implement neither append() nor extend() methods. (realpython.com/python-sets)


Comment on Disqus:

Comment on Twitter:

Question difficulty: ๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต


Similar questions: