-200 listik if len listik print Element with index is listik else prin

1
2
3
4
5
6
7
a = -200
listik = [1, 2, 3, 4]
if len(listik) >= a >= 0:
print(f"Element with index {a} is {listik[a]}")
else:
print(f"No element exists with index {a}")