Profile

Click to view full profile
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time. Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more...

Saturday, October 1, 2011

How to print percent sign in Python

Hahaha! until now, I still don't know how to print percent sign in Python yet because I haven't needed to use it. The solution is in your printout string, you need to put '%%' (concatenate percent signs). Then, the output will show the percent sign.

print 'Your accuracy is 80%%.' # Your accuracy is 80%.

No comments:

Post a Comment