Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cloth_size(lst):
- cloth_dict = {'S':0, 'M':0, 'L':0}
- for i in lst:
- if i <= 36:
- cloth_dict['S'] += 1
- elif i <= 44:
- cloth_dict['M'] += 1
- else:
- cloth_dict['L'] += 1
- return cloth_dict
- #Main Program
- print(cloth_size([50,44,40,48]))
- print(cloth_size([10,20,30,40,50]))
Advertisement
Add Comment
Please, Sign In to add comment