Python quiz time
What is the result?
A.
0 Sunday
1 Monday
2 None
3 None
4 None
5 None
6 None
B.
0 Sunday
1 Monday
C.
1 Sunday
2 Monday
3 None
4 None
5 None
6 None
7 None
D.
Gives error since list size mismatched
@RecursiveNeuron B. zip takes the shorter of the two.
You could get D by using zip(…, strict=True).
https://docs.python.org/3/library/functions.html#zip
You’d get A by using itertools.zip_longest().
https://docs.python.org/3/library/itertools.html#itertools.zip_longest
Using range(1, 8) with itertools.zip_longest() would give you C