[Solved] How to do list comprehension that display a list elements whose elements and index are divisible by 6?


>>> lst = [6,12,8,9,1,18,24]
>>> print([value for index,value in enumerate(lst) if index%6==0 and value%6==0])
[6 , 24]

solved How to do list comprehension that display a list elements whose elements and index are divisible by 6?