Quick Quiz!
We'll cover the following...
We'll cover the following...
Technical 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")
1 / 3