Advertisement
Guest User

Untitled

a guest
Nov 7th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. friend_names = input().split(", ")
  2. command = input().split()
  3. lost_names = 0
  4. def in_blacklist(blacklist, names_is):
  5.     return True if names_is in blacklist else False
  6. def in_friendlist(friendlist, name_is1):
  7.     return True if name_is1 in friendlist else False
  8.  
  9. while not command == "Report":
  10.     command_type = command[0]
  11.     name = command[1]
  12.  
  13.     if command_type == "Blacklist":
  14.         while not command[1]=="":
  15.             if in_blacklist(friend_names,name):
  16.                 print(f"{name} was blacklisted")
  17.             elif not in_friendlist(friend_names, name):
  18.                 print(f"{name} was not found.")
  19.  
  20.     if command_type == "Error":
  21.         if name is not in_blacklist(friend_names,name):
  22.             print(f"{name} was lost due to an error.")
  23.     if command_type == "Change":
  24.         index = friend_names[0]
  25.         if index =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement