Run Program ❯
Python Home
❯
Run Code
Change Orientation
# Creating a list fruits = ["apple", "banana", "cherry", "date", "elderberry"] # Accessing items using positive index print(fruits[0]) # Output: apple print(fruits[2]) # Output: cherry # Accessing items using negative index print(fruits[-1]) # Output: elderberry print(fruits[-3]) # Output: cherry