python get first value in every lis of lists code example
Example 1: python first n elements of list
a=list((1, 2, 3))
n=1
a[:n]
output:
[1]
Example 2: how to find first value of an list
// Python
list = [1,2,3]
firstdigit = list[0] // 1
list = ['Hello', 'bye', 'Adios']
firstvalue = list[0] // 'Hello'