The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
my_list = [None, None] my_list[2:] = [True] print(my_list)
Another Python syntactic sugar! First, my_list[2:] accesses the list after the 2nd element, e.g. after the second None . Because my_list[2:] represents all elements between the second None and the end of the list, updating this area with another list will be equivalend to the append() method. (programiz.com/python-programming/methods/list/append)
Question difficulty: 🔵🔵🔵🔵🔵