Hard
What is the output of the following code ?
def f(l):
for element in l:
print(element, end=" ")
else:
print("\nOops, something went wrong...")
f(list())
f([x for x in range(3)])
Author: W3D TeamStatus: PublishedQuestion passed 2515 times
Edit
25
Community EvaluationsNo one has reviewed this question yet, be the first!
12
Use the zip() function to iterate over two lists in parallel.8
Find the word 'lazy' in a sentence using Python6
What is the difference between the `__repr__()` and `__str__()` methods in Python?6
What do `a^b`, `a|b` and `a-b` respectively represent in Python ?41
Write a Python function that returns the factorial of a number.10
Start a HTTP server from the CLI with python11
What type is `function_a` in the following code ?