Considering below example,
myList = [1, 2, 3, 4, 5, 6]
To print last index,
# Non - pythonic
if len(myList) >= 6:
print(myList[5])
else:
print('Index does not exist')
# Pythonic
try:
print(myList[5])
except:
print('Index does not exist')
What is the idea behind the preference to ask for forgiveness over taking permission?