Answers for "how to position in list python"

43

python find index by value

>>> ["foo", "bar", "baz"].index("bar")
1
Posted by: Guest on November-19-2019
1

how to get something from a certian possition in a list python

lst = [1,2,3]
print(lst[1]) # will print 2
Posted by: Guest on January-17-2021

Code answers related to "how to position in list python"

Python Answers by Framework

Browse Popular Code Answers by Language