Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to end a while loop python

while True:
    x = input('Enter something 
')
    if x == "TTYL":
        print("Talk to you later")
        break <--- Key word
 
PREVIOUS NEXT
Tagged: #loop #python
ADD COMMENT
Topic
Name
5+3 =