In the last tutorial, you learnt about Python3: Lists and Dictionaries. In this tutorial, you'll learn how to take input. Let's get started! (This will be a really short tutorial!)
So far, you've only be outputting / printing values. It's useful to input values as well. For this, you can use the input function.
Take a look at the code below:
type=codeblock|id=py3_input|autocreate=python3|input=Commonloungename = input()print("Hello " + name + "!")
When you run the code above, it reads the user's name from the input and then greets them by their name. For example, if the input is "Commonlounge", the program outputs:
Use the Try it now! button above, go to the input tab and write your name, and then click Run.
Note: In general, the input() function keeps reading input till it sees an Enter (or newline).