如果有一个列表,比方说a=[1,2,3],我希望看到if a[4] is null,有没有办法做到这一点,而不使用异常或断言?
a=[1,2,3]
if a[4] is null
python list
list ×1
python ×1