Categories
Python Answers

How to use raw_input in Python 3?

Spread the love

Sometimes, we want to use raw_input in Python 3.

In this article, we’ll look at how to use raw_input in Python 3.

How to use raw_input in Python 3?

To use raw_input in Python 3, we replace raw_input with input.

For instance, we write

print("Hi " + input("Say something: "))

to call input with a string for the prompt.

And then we get the entered value from the value returned from input.

Conclusion

To use raw_input in Python 3, we replace raw_input with input.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *