Question from the Python - Fundamentals test

Write a Python function that prints the elements of a list.

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: ThéoStatus: PublishedQuestion passed 1659 times
Edit
16
Community EvaluationsNo one has reviewed this question yet, be the first!