Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

negative indexing in Python

# Negative indexing is does not exist in C#, Java and the like

my_list = [1, 2, 3]
print(my_list[-1])

# Output - 3
Source by www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #negative #indexing #Python
ADD COMMENT
Topic
Name
9+1 =