How do I use raw input in Python 3

0 votes
import sys

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,480 points

3 answers to this question.

0 votes

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

answered Jan 4 by Gitika
• 65,950 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 9,299 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
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
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
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 2,410 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 14, 2020 in Python by Gitika
• 65,950 points
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,950 points