I am trying to write a list comprehension which will select all numbers in a sequential list of numbers (whose length will change) which are divisible by 4.
end_of_quarter_dates = [i if i % 63 == 0 for i in range(0, 252)]
I am getting the error message "invalid syntax" for the beginning of the for loop.
Any thoughts appreciated.