Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1.  
  2.  
  3. >>>lista=[32,5, 12, 8, 3, 75, 2, 15]
  4. >>>a,b,c=0,len(lista),-2
  5. >>>t1=[""]
  6. >>>t2=[""]
  7. >>>t3=[""]
  8. >>>while a<=b:
  9. ... t1=lista[c]
  10. ... a,c=a+1,c+1
  11. ... if t1%2==0:
  12. ... t2.append(lista[c])
  13. ... else:
  14. ... t3.append(lista[c])
  15. ...
  16. >>>print t2,t3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement