Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)

Can anyone tell me how to take input in Python?

1 Answer

0 votes
by (107k points)

If you are talking about user input, then you can just write:

a=input('Enter your desired number: ')

The above code will ask you to enter the number, and whatever number you enter will be stored in the variable 'a.'

If you simply want to initialize the variable, then you can write:

a=10

If you are looking for an online course to learn Python, check out this Python Training program by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 11, 2020 in Python by ashely (50.2k points)
0 votes
2 answers
asked May 11, 2020 in Python by Sudhir_1997 (55.6k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...