Advertisement
WupEly

Untitled

Nov 21st, 2022
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import csv
  2.  
  3. suitable = []
  4. ship_list = input().split(" - ")
  5. feature = input()
  6. with open('test.csv', newline='') as f:
  7. reader = list(csv.reader(f))
  8. reader.pop(0)
  9.  
  10. for row in reader:
  11. if row[2] not in ship_list:
  12. if feature.lower() not in row[3]:
  13. if row[1] not in suitable:
  14. suitable.append(row[1])
  15.  
  16. suitable.sort()
  17. for i in suitable:
  18. print(i)
  19.  
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement