Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- parking_lot = set()
- while True:
- command = input().split(', ')
- if command[0] == 'END':
- break
- direction, car_number = command
- if direction == 'IN':
- parking_lot.add(car_number)
- else:
- parking_lot.remove(car_number)
- if parking_lot:
- [print(car) for car in parking_lot]
- else:
- print('Parking Lot is Empty')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement