Avatar ·

How to withdraw an even number from the list if all other values ​​are odd, and vice versa?

📁 python, пример

lists can be two types, with all the even numbers and one odd, and with all the odd numbers and one one. There can be at least three values ​​in the list.

lists for example:

  [ 2 ,  4 ,  0 ,  100 ,  4 ,  11  2602 ,  36 ] # must deduce 11 (as one odd)   [ 160 ,  3 ,  1719 ,  19 ,  11 ,  13 , - 21 ] # must take 160 (like one thing even)      

how to write a code so that one different number is displayed?