access a list in python code example
Example 1: access element from list python
list1 = [1,2,3,4,5]
for i in list1:
print(i)
Example 2: Python - Access List Items
thislist = ["apple", "banana", "cherry"]
print(thislist[1])
list1 = [1,2,3,4,5]
for i in list1:
print(i)
thislist = ["apple", "banana", "cherry"]
print(thislist[1])