On Tue, Jan 08, 2019 at 01:05:09PM +1100, Chris Angelico wrote:
> No, because the iteration would never happen. If the list is empty,
> a[1:] is also empty, and i==a[0] will never be evaluated. So it is
> safe. (But I agree that it's not instantly obvious.)

Oh yeah, you're right. I overthought it too much. :)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to