Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get the first item in a list in python 3

# How to get the first item in a list in python 3
bikes = ['trek', 'redline', 'giant']
first_bike = bikes[0]
print(first_bike)

# Output -
# trek
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #item #list #python
ADD COMMENT
Topic
Name
1+4 =