Advertisement
mbstanchev

company users

Jul 17th, 2022
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. command = input()
  2. dict = {}
  3. while command != 'End':
  4. company, ident_num = command.split(' -> ')
  5. if company not in dict:
  6. dict[company] = []
  7.  
  8. if ident_num not in dict.values():
  9. dict[company].append(ident_num)
  10.  
  11. command = input()
  12.  
  13. for k,v in dict.items():
  14. print(f"{k}")
  15. for i in v:
  16. print(f'-- {"".join(i)}')
  17. print(dict.values())
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement