raw input function in Python

0 votes
What is the raw_input function? Is it a user interface? When do we use it?
Feb 17, 2022 in Python by surbhi
• 3,820 points
395 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
It shows the user a prompt (the optional arg of raw input([arg]) and takes input from the user before returning the data in a string.

name = raw_input("What is your name? ")
print "Hello, %s." % name

This differs from input() in that the latter attempts to comprehend the user's input; it is usually preferable to use raw input() and custom parsing/conversion code instead of input().
answered Feb 17, 2022 by CoolCoder
• 4,420 points

edited 5 days ago

Related Questions In Python

0 votes
1 answer

What is the use of raw_input function in Python?

raw_input fuction is no longer available in ...READ MORE

answered May 2, 2018 in Python by aayushi
• 750 points
1,398 views
0 votes
1 answer

raw_input function in Python

raw_input was used in Python 2 version ...READ MORE

answered Feb 17, 2022 in Python by Dev
• 6,000 points
665 views
0 votes
1 answer

What does ' -> ' mean in Python function definitions?

It's a function annotation. In more detail, Python 2.x ...READ MORE

answered May 23, 2018 in Python by charlie_brown
• 7,720 points
1,011 views
+1 vote
1 answer

What is the function for Factorial in Python

Easiest way: math.factorial(x) (available in 2.6 and ...READ MORE

answered Aug 21, 2018 in Python by Priyaj
• 58,020 points

edited Aug 21, 2018 by Omkar 1,515 views
0 votes
1 answer

Python: Lambda function in List Comprehensions

The first one create a single lambda ...READ MORE

answered Aug 27, 2018 in Python by Priyaj
• 58,020 points
2,735 views
0 votes
1 answer

Is there a foreach function in python and is there a way to implement it if there isnt any

Every occurence of "foreach" I've seen (PHP, ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,720 points
1,272 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,639 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,410 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP