mrksharif
mrksharif

Reputation: 89

Console closes immediately after I run Python code on Windows 10

Though I use input() at the end of my code, the console stil immediately closes after entering the name in the window in Windows 10 (outside of IDLE), and I cannot see the result. What can I do to stop the console from closing?

#! python 3
name = input('Enter your name: ')
print('Hello ' + name)
input('press Enter to exit: ')

Upvotes: 2

Views: 1188

Answers (0)

Related Questions