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!
Question #338
my_list = ["Python", "Java", "JavaScript", "C++"]
print(my_list[-1][-1])
It will print + . [-1] first selects C++ and the second one selects + . (railsware.com/blog/python-for-machine-learning-indexing-a...)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) March 19, 2021
my_list = ["Python", "Java", "JavaScript", "C++"]
print(my_list[-1][-1])
+
Python
It will throw a IndexError error.
n
C++
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅