python 3.x – Whats a substitute for raw_input() in 3.6?

python 3.x – Whats a substitute for raw_input() in 3.6?

OK, Im guessing youre talking about Python 3.6.

First mistake:

 e=input(whats your name?) #notice how youre using too many 

Correct:

 e=input(whats your name?)

Second mistake:

print(so you %s, %s, %s. % (e,l,x)) 
#you did not specify l and x, so Python will throw an error

Correct:

Declare and assign values to the l and x variables before using them.
Just make an input like you did to e, for example:

l=input(whats your L?)


In Python 3 there are no raw_inputs because all inputs are raw_inputs.
It took away Pythons 2 regular input because it was too problematic. So Pythons 3 input == Pythons 2 raw_input.

To use Pythons 2 regular input in Python 3, use eval(input()). For more information, see: http://docs.python.org/dev/py3k/whatsnew/3.0.html

python 3.x – Whats a substitute for raw_input() in 3.6?

Leave a Reply

Your email address will not be published.