+ 3

What's wrong in this??

l=list(map(int,input().strip().split())) p=len(l) j=1 for i in range(0,p): if(j<p): if(l[i]==l[j]): print("hi") l.remove(l[i]) j=j+1

3rd Dec 2019, 7:10 PM
Pratik Kumbhar
Pratik Kumbhar - avatar
5 odpowiedzi
4th Dec 2019, 6:28 AM
Pratik Kumbhar
Pratik Kumbhar - avatar
+ 2
i run the code with some input values, and it does work properly. What input value did cause your problem?
3rd Dec 2019, 7:15 PM
Lothar
Lothar - avatar
0
100 100 50 40....this cause error
3rd Dec 2019, 7:16 PM
Pratik Kumbhar
Pratik Kumbhar - avatar
3rd Dec 2019, 8:07 PM
Pratik Kumbhar
Pratik Kumbhar - avatar