String Formatting


i had tried this code in python 3 IDLE with parenthesis knowing that it is a function now
but it haven’t worked . Please help!


if we can’t see the code you attempted in the IDLE, its really difficult to tell why it isn’t working


Ok here is the screenshot


Hello :slight_smile:

string_1 = "Camelot"
string_2 = "place"

print("Let's not go to %s. Tis a silly %s." % (string_1, string_2))

Tuple with the strings you want to put in must be a part of the function call.

You have closed the call to the function print too early ()).


Oh so everything should be inside the parenthesis of the function 'print’
Now i have understand thanks! :slight_smile:


Exactly! You’re welcome :slight_smile:


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