Posts by Luxa • 13 points
1 post
-
1
votes1
answer40
viewsQ: Python - Conditional Expression
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'…