Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16418

Making input and loop (Python)

$
0
0

So recently i was making some decision-like input. And i want the input return itself after displaying it. Here's what i mean:

# >a = input()  *if* a == 'Y':  print('Hello')  *else if* a == 'X':  print('Hola')    # <

now, ">" means first position, and "<" mean the end. When it reach "<" it return back to ">" so i can input other like, first i am going to answer "Y" and it display "Hello" then returning back to ">" and can input other, like "X" and it display "Hola"the idea of making this to prevent from "process exited, return code: 0"can anyone help this? Thanks.

i tried it and it says "Process exited, return code: 0"i just want it loop so i can input other choices.


Viewing all articles
Browse latest Browse all 16418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>