Code 85
Published in

Code 85

How To Request Command-Line Input in Python

Learn to use input() and avoid common pitfalls

Photo by Rohit Farmer on Unsplash

If you are writing command-line Python scripts, then you will need to request input from the user at some point. In Python, the mechanism for requesting command-line values is the input() function.

Let’s go over how to use input() and make sure you’re prepared to avoid three common…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store