#.count()
#.insert()
#.pop () remove specific index or from end
# range() create a sequence of integres
# len() comprimento 
#.sort()/sorted()  built-in function to sort a list

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[0]
last = inventory[-1]

inventory_2_6 = inventory[2:6]

#pega até um antes
first_3 = inventory[:3]

twin_beds = inventory.count("twin bed")

removed_item = inventory.pop(4)

inventory.insert(10, "19th Century Bed Frame")

inventory = sorted(inventory)

print(inventory)