Advertisement
Guest User

Untitled

a guest
Nov 9th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. l = [1, 3, 3 , 7]
  2. def modify_list(l):
  3. [l.remove(i) for i in l if not i%2 == 0]
  4. copy = l; copied = list(copy); l.clear()
  5. [l.append(i//2) for i in copied if i not in l
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement