What if ply != com in the first (0th) iteration? 

It's better to have an 'else:'-statement in your case, I suppose.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to