Advertisement
vasil_k_k

04. Students

Jan 6th, 2023 (edited)
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. students, command = {}, input()
  2. while ":" in command:
  3.     name, identity, course = command.split(":")
  4.     students[name], command = [identity, course], input()
  5. for key, value in students.items():
  6.     if [i for i in command if ord(i) in range(97, 123)] == [i for i in value[1] if ord(i) in range(97, 123)]:
  7.         print(f"{key} - {value[0]}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement