17:16 Comprehending Comprehension


#1

I cannot find my syntax error

threes_and_fives = [x for x in range(1,16) if x%3==0 or if x%5==0]


#2

extra if.. Effaoeuaoeuaoeuaoeu


#3

Al most right, you only need 1 if:

threes_and_fives = [x for x in range(1,16) if x%5==0 or x%3==0]

#4

aoeuidhtns :smiley:


#5

dvorak 24-7
may the aoeuidhhtns be with you.

https://learn.dvorak.nl/


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.