Jak sprawdzić, czy lista podnosi indekserorror, ale wihing a IF Python

if 0 <= x < len(lst)
Dead Deer