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 #596
l = [-2, 4]
m = map(lambda x: x*2, l)
print(m)
This will print the address of m . Had we used the statement: print(list(m)) , the output would have been [-4, 16] . (geeksforgeeks.org/python-lambda-anonymous-functions-filte...)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) September 28, 2020
l = [-2, 4]
m = map(lambda x: x*2, l)
print(m)
-4
16
[-4, 16]
It will throw a SyntaxError error.
The address of m
-15
4#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅