Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
3 views
in Python by (47.6k points)
edited by

What is the raw_input function? Is it a user interface? When do we use it?

1 Answer

0 votes
by (106k points)
edited by

raw_input  is used to get the input from the user, raw_input([arg])), gets input from the user and returns the data input by the user in a string. Python 2.x versions use this method. 

Code example:

abc = raw_input("Who are you? ") 

print "Hello, %s." % abc

To know more about this you can have a look at the following video:-

Related questions

0 votes
1 answer
0 votes
1 answer
asked Sep 23, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer

Browse Categories

...