Learn

Now let’s look at str(), which is a little less straightforward. The str() method turns non-strings into strings! For example:

str(2)

would turn 2 into "2".

Instructions

1.

Create a variable pi and set it to 3.14 on line 4.

Call str(pi) on line 5, after print.

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?