[Tutor] rstrip() failure ?
dave s
pythontut at pusspaws.net
Wed Aug 9 23:15:11 CEST 2006
On Wednesday 09 August 2006 21:11, you wrote:
> > Is there a way to show the ascii values of the string - kind of hexedit
> > for a string
>
> Try running repr() on the string: it will show an external
> programmer-friendly representation that should be easier to read. For
> example:
>
> ##########################
>
> >>> msg = 'hello\000world'
> >>> print repr(msg)
>
> 'hello\x00world'
> ##########################
Thanks for that :)
Have just found my solution without resorting to ascii strings after all but
the above will be usefull
Thanks once again
Dave
More information about the Tutor
mailing list