Skip to content

Input Function

Python Input Function

The input function waits for the user to type some text on the keyboard. Prompt is optional. Colt prefers to use a print statement as the prompt and then get the input on a separate line.

my_name = input("Enter your name: ")

All values from the input function come in as strings. If you enter 29 and want to use it in a math function you need to convert it with either the int or float function