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 #573
t=(1,2,4,3)
print(t[1:-1])
This will return (2, 4) . Slicing with tuples takes place just as it does with strings. (geeksforgeeks.org/tuples-in-python)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) December 20, 2020
t=(1,2,4,3)
print(t[1:-1])
(1, 2, 4)
(1,2,3)
(2, 4, 3)
(1, 2)
(2, 4)#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅