
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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.
Advertisements