what does %u mean?
scruffy.mogwai at gmail.com
scruffy.mogwai at gmail.com
Thu Jun 8 23:44:42 EDT 2006
Someone beat me to the reply -- and their explanation sounds a lot
better than mine!
i guess you learn something new everyday...
scruffy.mog... at gmail.com wrote:
> I'm not sure, but I think it has something to do with unicode.
> print "%i" % 1 // Prints the integer 1 as a string.
> print "%u" % (-5) // Prints -5 as a unicode string???
>
> yaru22 wrote:
> > Hi. I just started learning python.
> >
> > In the exercise in my book, it asks me to try print "%u" % (-5)
> >
> > I'm wondering what this %u mean?
> >
> > Thank you.
> >
> > Regards,
> >
> > Brian.
More information about the Python-list
mailing list