negative arr positinon 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"]