Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
Can anyone tell me how to get input from the user in Python?

1 Answer

0 votes
by (108k points)

If you want to take in the input from a user, you can use the built-in function in Python that helps you do just that. If you are using an older Python (2x) version, then the below code will be useful:

raw_input(‘Enter the user input: ‘)

And if you are using the latest version of Python (3x), then you need to use the following code:

input(‘enter the user input: ‘)

If you are looking for an online course to learn Python, I recommend this Python Course by Intellipaat.

Browse Categories

...