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 Nandini
• 5,480 points
557 views

1 answer to this question.

0 votes

raw_input was used in Python 2 version but for latest Python 3 and higher versions input does the job of raw_input.
Also  in raw_input argument is passed in the form of string. raw_input will give a name error in Python 3 
raw_input does not covert input and take it as it is provided by the user.

Example of input() in Python 3

Your_name = input("What is your name? ")
print ("Hi, %s." % Your_name)

Output

What is your name? Tia
Hi, Tia.
answered Feb 17, 2022 by Dev
• 6,000 points

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,177 views
0 votes
0 answers

raw_input function in Python

What is the raw_input function? Is it ...READ MORE

Feb 17, 2022 in Python by surbhi
• 3,820 points
307 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
833 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,100 points

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

Python division

You're using Python 2.x, where integer divisions ...READ MORE

answered Oct 13, 2018 in Python by SDeb
• 13,300 points
736 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,350 views
0 votes
2 answers

What's the difference between %s and %d in Python string formatting?

The reason is that they are using ...READ MORE

answered Feb 8, 2022 in Python by Rahul
• 9,680 points
22,230 views
0 votes
1 answer

What is the difference between sets and lists in Python?

Lists can contain duplicates but sets cannot Sets ...READ MORE

answered Feb 9, 2022 in Python by Dev
• 6,000 points
1,019 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