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 in Python by anonymous
• 10,420 points
132 views

3 answers to this question.

0 votes

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

answered Jan 4 by Gitika
• 65,870 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 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 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,520 points

edited Dec 11, 2018 by Nymeria 8,096 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
658 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
421 views
0 votes
2 answers

How do I copy a file in python?

copy a file in python  from shutil ...READ MORE

answered Mar 27, 2019 in Python by rajesh
• 1,230 points
246 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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,982 views
0 votes
0 answers
0 votes
5 answers

How can I use grep in Python?

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

answered Dec 13, 2020 in Python by Gitika
• 65,870 points
40,617 views
0 votes
4 answers

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

1886 Use del and specify the index of the element ...READ MORE

answered Dec 11, 2020 in Python by Gitika
• 65,870 points
63,659 views