Fix sign-compare violations in python_list.h
`idx` is signed type as well as `len()`, so no need to cast one of the
two two unsigned.
Prerequisite change for enabling `-Werror=sign-compare` across PyTorch repo
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75076
Approved by: https://github.com/albanD