# Python3 program to extract first and last
# element of each sublist in a list of lists
def Extract(lst):
return [item[0] for item in lst]
# Driver code
lst = [[1, 2], [3, 4, 5], [6, 7, 8, 9]]
print(Extract(lst))
list[0]
// Python
list = [1,2,3]
firstdigit = list[0] // 1
list = ['Hello', 'bye', 'Adios']
firstvalue = list[0] // 'Hello'
# 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
an_array = [1,2,3,4,5]
first element = an_array[0]
some_list[0]