1
Hello,
I am learning Python and in my studies I came across the following situation:
>>> responses = ['Y', 'Yes', 'No', 'no', '', 'Yep']
>>> responses = [x[0].lower() if x else 'n' for x in responses]
>>> responses
['y', 'y', 'n', 'n', 'n', 'y']
I can’t understand in this case what makes the x was True or False?
Thanks for your attention.
Putz, simple! I didn’t pay attention to True, I kept trying to understand the n of the others. Thank you Sidon.
– Luxa