list comprehension 4

Run Settings
LanguagePython
Language Version
Run Command
list = [i for i in range(1, 10) if i%2] #show any numbers from range(1, 2, 3, 4, 5, 6, 7, 8, 9) divided by 2 with remainder print(list) #show a list [1, 3, 5, 7, 9] for i in range(1, 10): if i % 2: i True == 1 print(i) #yield i
Editor Settings
Theme
Key bindings
Full width
Lines