element in a list python code example
Example 1: list in python
thislist = ["apple", "banana", "cherry"]
print(thislist[1])
Example 2: reading a list in python
strings = list(map(str,input().split()))
numbers = list(map(int, input().split()))
Example 3: python lists
fruits = ['apple', 'banana', 'mango', 'cherry']
for fruit in fruits:
print(fruit)
Example 4: python lists
games = ['Fortnite', 'CS:GO', 'Temple Run']
print(games)