Reading text from the keyboard

The input function

Text can be read from the keyboard with the input function. input works with and without a message text. The value returned is always a string:

a = input()
b = input('Please enter a number')

Although the input command is rarely seen in big programs, it often helps to write small, understandable programs, especially while learning Python.