fruits = ["apple", "banana", "cherry"]for x in fruits: print(x) if x == "banana": break
Standard input is empty
apple banana
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!