M
M
mim1mim2020-06-25 17:13:27
Python
mim1mim, 2020-06-25 17:13:27

Is it possible to display an element of a list by index?

Hello, is there a method in python to print an element of a list by its index.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zexer, 2020-06-25
@mim1mim

a = [1, 2, 3, 4]
print(a[0])
1

M
meaqese, 2020-06-25
@meaqese

l1st = [1, 2, 3, 4]
print(l1st[1]) # Вывод: 2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question