Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def print_func(data):
- if data:
- for car in parking_cars:
- print(car)
- else:
- print(f"Parking Lot is Empty")
- n = int(input())
- parking_cars = set()
- for _ in range(n):
- information = input()
- information_split = information.split(", ")
- direction = information_split[0]
- plate_number = information_split[1]
- if direction == "IN":
- parking_cars.add(plate_number)
- elif direction == "OUT":
- parking_cars.remove(plate_number)
- print_func(parking_cars)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement