[Tutor] Space the final frontier!

Ryan Ginstrom ryang at gol.com
Wed Apr 5 02:22:27 CEST 2006


[Sorry for the initial misfire, John]
> [mailto:tutor-bounces at python.org] On Behalf Of John Corry
> 001,newfield,dial=02890790154,dial=
> 002,borfiled,dial=02890618521,dial=
> 003,newcomp,dial=02890419689,dial=

Hi John:

I believe the common idiom in this case is 
''.join( theString.split( ' ' ) )

>>> theLines = [ '001,newfield,dial=02890790154,dial=',
'002,borfiled,dial=02890618521,dial=',
'003,newcomp,dial=02890419689,dial=']
>>> for line in theLines:
	print ''.join( line.split( ' ' ) )

001,newfield,dial=02890790154,dial=
002,borfiled,dial=02890618521,dial=
003,newcomp,dial=02890419689,dial=

Regards,
Ryan

---
Ryan Ginstrom
http://ginstrom.com 



More information about the Tutor mailing list