# List is a collection which is ordered and changeable. Allows duplicate members.
# Tuple is a collection which is ordered and unchangeable. Allows duplicate members.
# Set is a collection which is unordered, unchangeable*, and unindexed. No duplicate members.
# Dictionary (Struct/Object) is a collection which is ordered** and changeable. No duplicate members.

# List:
# Index      0         1         2        3         4       5        6
mylist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]

print(len(mylist))      # 7
print(mylist[0])        # "apple"
print(mylist[1])        # "banana"
print(mylist[-1])       # "mango"
print(mylist[2:5])      # Index:2,3,4 = ["cherry", "orange", "kiwi"] 
print(mylist[:3])       # Index:0,1,2 = ["apple", "banana", "cherry"]
print(mylist[4:])       # Index:4,5,6 = ["kiwi", "melon", "mango"]

if "apple" in mylist:
  print("Yes, 'apple' is in the fruits list")

# Insert
mylist.insert(2, "watermelon") # ["apple", "banana", "watermelon" ...]

mylist.append("lemon")

tropical = ["pineapple", "papaya"]
mylist.extend(tropical)

# Remove
mylist.pop(2)

# remove all
mylist.clear()