Negative Indexing lists in Python to prevent index out of range

preview_player
Показать описание
To get the the last element of a list, you have to use the length of the list and subtract one. But what if Python can do this for you? Yes, negative indexing is just that!

C H A P T E R S
0:30 Get the last element by index
1:40 Last element by using the length of the list
1:58 Last element by using a negative index

M Y O N L I N E T R A I N I N G

#negativeindex #programming #python
Рекомендации по теме
visit shbcf.ru