- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Taking input from console in Python
In this tutorial, we are going to learn how to take input from the console in Python.
The interactive shell in Python is treated as a console. We can take the user entered data the console using input() function.
Example
# taking input from the user a = input() # printing the data print("User data:-", a) Tutorialspoint User data:- Tutorialspoint
Output
If you run the above code, then you will get the following result.
Tutorialspoint User data:- Tutorialspoint
Conclusion
The data that is entered by the user will be in the string format. If you have any doubts in the tutorial, mention them in the comment section.
- Related Articles
- Python program to read input from console
- Taking input in Python
- Taking input from the user in Tkinter
- Way to read input from console in C#
- Ways to read input from console in Java
- Get number from user input and display in console with JavaScript
- Taking multiple inputs from user in Python
- Take Matrix input from user in Python
- How to populate an array one value at a time by taking input from user in Java?
- Read integers from console in Java
- Display a message on console while focusing on input type in JavaScript?
- How to change the Input Encoding Scheme of the C# Console?
- How to get the Standard Input and Output Stream through Console in C#?
- Iterate over lines from multiple input streams in Python
- How to create Python dictionary from JSON input?

Advertisements