break. 當偵測到字母 t 時,就會強制結束迴圈: count=0 for string in 'content': count+=1 if string == 't': break print(string) print('\n迴圈結束')
確定! 回上一頁