Answers for "how to take the first element of a sub list in python"

3

python get first n elements of list

l = [1, 2, 3, 4, 5]
print(l[:3])
Posted by: Guest on June-02-2020
2

Python get first element from list

list[0]
Posted by: Guest on September-12-2020

Code answers related to "how to take the first element of a sub list in python"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language