在C中,我会这样做:
int i; for (i = 0;; i++) if (thereIsAReasonToBreak(i)) break;
如何在Python中实现类似的功能?
python loops
loops ×1
python ×1