Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inventory = ['twin bed', 'twin bed', 'headboard', 'queen bed', 'king bed', 'dresser', 'dresser', 'table', 'table', 'nightstand', 'nightstand', 'king bed', 'king bed', 'twin bed', 'twin bed', 'sheets', 'sheets', 'pillow', 'pillow']
- inventory_len = len(inventory)
- first = inventory[1]
- last = inventory[-1]
- inventory_2_6 = inventory[2:6]
- first_3 = inventory[: 3]
- twin_beds = inventory.count('twin bed')
- inventory.sort()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement