Oct-03-2021, 03:39 PM
Hello,
I saw on GitHub this line of code:
Can someone help me and show how this line of code would be written if it wouldn´t be in
a list comprehension
Thanks
I saw on GitHub this line of code:
word_list = [letter if letter in used_letters else '-' for letter in word]But I have never seen list comprehensions used in this way and don´t understand it really.
Can someone help me and show how this line of code would be written if it wouldn´t be in
a list comprehension
Thanks