+ 1

'not all arguments converted during string formatting' - what this implies?

l= list(input().split()) for i in range(len(l)): if(l[i]%2==0): print(i) why this code is not working?

26th Jun 2018, 6:27 AM
Tincture
1 Réponse
0
list elements are not integers and u can' t use % operator. Firt u need to convert l into a list of integers using map l = list( map( int , l ))
8th Jul 2018, 2:25 AM
Aravind Shetty
Aravind Shetty - avatar