0

How can delete in list like [4,2] as I already have [2,4]

https://code.sololearn.com/ctK37e27fODb/?ref=app

20th Jul 2020, 5:53 AM
Gireesh Desineni
Gireesh Desineni - avatar
10 odpowiedzi
+ 3
There are many ways to do this. In my opinion, just replace "n" with "n//2+1" in range function, and it will work fine. https://code.sololearn.com/cl3i1b1dD5DA/?ref=app
20th Jul 2020, 6:07 AM
李立威
+ 1
Tq 🤗 Master Ji
20th Jul 2020, 6:08 AM
Gireesh Desineni
Gireesh Desineni - avatar
+ 1
Gireesh Desineni If you don't want any zero-including answer in your output, you can change this line in your "containszero" function: replace if(z in a and z in b): with if(z in a or z in b):
20th Jul 2020, 6:27 AM
李立威
+ 1
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 That's Fine Bro 🔥🔥.. Tqs For The Support
20th Jul 2020, 6:32 AM
Gireesh Desineni
Gireesh Desineni - avatar
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Your Code Is Good But Check For f(11)... Solution has an integer 10 which is not no zero integer
20th Jul 2020, 6:22 AM
Gireesh Desineni
Gireesh Desineni - avatar
0
李立威 I replaced not in for loop I Managed It Anyway
20th Jul 2020, 6:29 AM
Gireesh Desineni
Gireesh Desineni - avatar
0
李立威 if it's or 10 0r 5 Returns True
20th Jul 2020, 6:30 AM
Gireesh Desineni
Gireesh Desineni - avatar
0
So I used and.. so that both Intergers will be no zero integer
20th Jul 2020, 6:31 AM
Gireesh Desineni
Gireesh Desineni - avatar