Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def checkio(a):
- #Your code here
- #It's main function. Don't remove this function
- #It's used for auto-testing and must return a result for check.
- source = set(a)
- source = dict.fromkeys(set(a), 0)
- for x, v in source.items():
- for y in a:
- if v >= 2:
- break
- if x == y:
- source[y] += 1
- for k, v in source.items():
- if v == 1:
- a.remove(k)
- #replace this for solution
- return a
Advertisement
Add Comment
Please, Sign In to add comment