input() built-in function takes in a value from the user and converts the value into a string.
This function is unique in that the environment creates a field to allow users to enter the value.
input() to prompt user to input a value:
password = input()print(password)
input() to prompt user to input a value based on a message:
username = input("What is your name?")print(username)
- Anonymous contributors
Learn Python on Codecademy
- Anonymous contributorsAnonymous contributors