james_027 <cai.haibin at gmail.com> writes: > for i in []: > #do something > is this safe? or should I put a if statement to test it first? That doesn't crash or anything like that, but it also doesn't set the index variable, which can cause confusion in some situations.