what is the negative index in python code example
Example: negative indexing in python
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]
print(thislist[-2:])
# ["melon","mango"]
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]
print(thislist[-2:])
# ["melon","mango"]