python中的while語句

while用法 while 條件滿足: 滿足條件執行的語句 else: 不滿足條件執行的語句 例: i=0 sum=0 while i<=100: sum +=i i+=1 print(sum) while死循環 while True: print('~~~~~~~~~~~~~') while 2>1: print('%%%%%') while嵌套
相關文章
相關標籤/搜索