How do I use raw input in Python 3

0 votes
import sys
print(sys.platform)
print(2**100)
raw_input()

I am using Python 3.1 and can't get the raw_input to "freeze" the dos pop-up. The book I'm reading is for Python 2.5 and I'm using Python 3.1

What should I do to fix this?

Jan 4, 2021 in Python by anonymous
• 10,480 points
3,122 views

3 answers to this question.

0 votes

Starting with Python 3, raw_input() was renamed to input().

answered Jan 4, 2021 by Gitika
• 65,770 points
0 votes

The raw_input() function reads a line from input (i.e. the user) and returns a string by stripping a trailing newline. This page shows some common and useful raw_input() examples for new users. Please note that raw_input() was renamed to input() in Python version 3

answered Jan 4, 2021 by Nikita
0 votes

raw_input() was renamed to input() in Python 3. Another example method, to mix the prompt using print, if you need to make your code simpler. x= int(raw_input()) -- Gets the input number as a string from raw_input() and then converts it to an integer using int()

answered Jan 4, 2021 by Carlos

Related Questions In Python

0 votes
1 answer

How do I use urllib to see if a website is 404 or 200 in Python?

For Python 3, try doing this: import urllib.request, ...READ MORE

answered Nov 29, 2018 in Python by Nymeria
• 3,560 points

edited Dec 11, 2018 by Nymeria 14,036 views
0 votes
0 answers

how do i use the XOR operator in python regular expression?

can u give an example? READ MORE

Mar 26, 2019 in Python by Waseem
• 4,540 points
1,775 views
0 votes
1 answer

How do I use lambda() with reduce() in python?

The reduce() function in Python takes in ...READ MORE

answered May 20, 2019 in Python by Umer
1,953 views
0 votes
0 answers

How do I use method overloading in Python?

I am trying to implement method overloading ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
513 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,443 views
0 votes
1 answer
0 votes
5 answers

How can I use grep in Python?

The first part starts with grep , followed by ...READ MORE

answered Dec 14, 2020 in Python by Gitika
• 65,770 points
72,522 views
+1 vote
4 answers

How do I remove an element from a list by index in Python?

Delete the List and its element: We have ...READ MORE

answered Jun 7, 2020 in Python by sahil
• 500 points
280,751 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