Nauč se Python > Materiály > Snake Workshop for PyLadies > Introduction to Python > Lists

Lists – Řešení [1]

>>> lottery
[59, 42, 30, 19, 12, 3, 199]
>>> lottery[1]
42

No, you will receive the second element.

Programmers count from zero. So if you want the first element, ask Python for element number zero.

>>> loterie[0]
42

At first, it's strange, but you can get used to it.


Toto je stránka lekce z kurzu, který probíhá nebo proběhl naživo s instruktorem.