IT45200

Untitled

Apr 2nd, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. num_list = [1, 5, 4, 3, 45, 45, 47, 1, 2, 2]
  2. done = []
  3. for elem in num_list:
  4.     if elem not in done:
  5.         print('number',str(elem),'appeared', str(num_list.count(elem)), 'time(s)')
  6.         done.append(elem)
Advertisement
Add Comment
Please, Sign In to add comment