i = 0 while i<100: i+=1 if(i % 3 == 0 and i % 2 != 0): print(i, end=', ') elif(i % 2 == 0): continue; else: pass
參考資料:
http://docs.python.org/3/tutorial/controlflow.html#if-statements
http://docs.python.org/3/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops
http://docs.python.org/3/reference/compound_stmts.html#the-while-statement