[Tutor] what does %25f mean?

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Oct 24 19:08:41 CEST 2005



On Mon, 24 Oct 2005, Shi Mu wrote:

> what does %25f mean?

Hi Shi Mu,

Without more context, I'd have to guess that this looks like a format
string.  Here's more information about them:

    http://www.python.org/doc/lib/typesseq-strings.html


But can you show us where you saw this "%25f" thing though?  Like bytes,
words can be "interpreted" in different ways.  Offhand, another
alternative interpretation is as a url-escaped string:

######
>>> import urllib
>>>
>>> urllib.unquote('%25f')
'%f'
>>>
>>> urllib.quote_plus('hello world, this is a percent: %')
'hello+world%2C+this+is+a+percent%3A+%25'
######

So if you can tell us where you saw '%25f', that'll help us cut down on
the possible explanations that can better account for what you're seeing.


Good luck!



More information about the Tutor mailing list