Avatar ·

How to add a condition in a list comprehension?

📁 List, Advanced Python Topics, work

I tried to do it like this, but it doesn't work

a = [int(input()) for i in range(5) if i % 10 == 0]

that is, I need to add a condition so that only numbers divisible by 10 without a remainder are added to the list