Computer Science Atlas
Snippets

Python 3: User Input Prompt

March 30, 2022
 
Table of Contents

Using input

On all versions of Python 3, we can use the built-in input() function to get user input:

name = input( 'Please enter your name: ' )
print( f'Hello, { name }!' )
1
2
name = input( 'Please enter your name: ' )
print( f'Hello, { name }!' )

See Also

Reference