Quick Quiz!

1

Select all the options whose output will contain the string "ftw" and no error.

A)
some_list = []
for x in some_list:
   print(x)
else:
   print("ftw")
B)
some_list = []
while some_list:
   print(some_list.pop())
else:
   print("ftw")
C)
some_list = []
try:
   print(some_list)
except Exception as e:
   pass
else:
   print("ftw")
finally:
   pass
D)
some_list = []

with open("some_file", "w") as f:
    f.write(str(some_list))
else:
   print("ftw")
Question 1 of 30 attempted

Get hands-on with 1400+ tech skills courses.