[Tutor] Re: string formatting problem

Ron A clickron@webtv.net
Sun Aug 3 16:39:02 EDT 2003


It works! When I removed the newline character everything worked fine.
Thanks

Ron A
********************************************
>This splits only on comma characters, so
> z is set to ['1', '2', '3', '4\n']. If you print
> z[3], that string will include a newline.  

>Simple fix: strip off the newline (and any
> other trailing whitespace) with .rstrip(): 





More information about the Tutor mailing list