Basic user input (text based)

--Originally published at Luis Santana's Blog

There will be times where you may need to know certain information to continue your code, information that only the user can give you. The best way to do this is by using “input”.

With “input” you will display a text that the user should answer in order to continue, the answer he/she gives will remain as a string and with that you can work with the answer.

Here you can see an example, you can also check this link for more infohttp://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/io.html

 

input