"Blackbird" <[EMAIL PROTECTED]> wrote: > >> [...] > > > >>>> a = 'I don\'t think so' > >>>> print '%r' % a > > "I don't think so" > >>>> a = r'I don\'t think so' > >>>> print "'%s'" % a > > 'I don\'t think so' > > Excellent counterexample. Can something like this happen for other things > than quotes?
>>> a = '\377' >>> print '%r' % a '\xff' >>> a = r'\377' >>> print "'%s'" % a '\377' I still recommend looking up %s and %r and str() and repr() in the documentation. it's not hard to understand what they do, and that approach works a bit better than cargo cult programming. </F> -- http://mail.python.org/mailman/listinfo/python-list