Why doesn't this string work?


“”“Tell Python to print “Monty Python"
to the console on line 4!””"

pi = Monty Python
Print str(pi)

Please leave the following link in the post so we can find the unit module, else replace it with a link to the exact lesson:

Strings and Console Output


keywords like print are case sensitive.

you only need print and the string you want to print, which is monty python. To make it a string, enclose monty python in quotation marks


Thanks! It worked! But not sure why my other code didn’t work since according to previous instructions, my initial approach could maybe work too.



pi = Monty Python

won’t work, given Monty and Python are undefined variable. If it was a string, and print didn’t have an uppercase letter, it should work indeed


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.