1,105,386 Community Members

How do you input % as regular text ?

Member Avatar
jxj123
Newbie Poster
2 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi, my code involves something like this:

IP = "123.123.123.123"

string = "Your IP is %s and it's 100% correct" % IP

The IDLE thinks the second % is a operator and I don't know how to make it as a regular text. please help.

Member Avatar
thines01
Postaholic
2,420 posts since Oct 2009
Reputation Points: 389 [?]
Q&As Helped to Solve: 413 [?]
Skill Endorsements: 10 [?]
Team Colleague
Featured
 
1
 

Did you try a double percent?
%%

Member Avatar
jxj123
Newbie Poster
2 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Did you try a double percent?
%%

That works perfectly. thank you so much thines01 !!!!

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article