Re: Converting tuple to String
On Sunday 30 April 2006 17:32, Byte wrote:
Is their a command to convert a tuple to string? e.g.
xyz = "Hello", "There"
print xyz
Is their any way of getting print to see xyz as being one string
i.e. "Hello There" rather than "Hello" and "There", despite "Hello"
and "There" being, in reality, seperate?
Use the "join" method of strings:
print ' '.join(xyz)
--
Stefan
.
Relevant Pages
- Converting tuple to String
... Is their a command to convert a tuple to string? ... Is their any way of getting print to see xyz as being one string i.e. ... "There" being, in reality, seperate? ... (comp.lang.python) - RE: Coding Help Needed!!
... I'm still learning this myself, so please take this with a grain ... maybe you could concatenate the string names into one string. ... seperate the string if possible, and then figure out your math for splitting. ... > both agents get a fifty, ... (microsoft.public.access.formscoding) - Re: Request to Andy Robinson and England team
... But reality also being what it is, if you can string some rugby moves ... you will probably beat the higest paid models on the South ... (rec.sport.rugby.union) - RoadMap to Reality - Was: Re: The case for Delphi... pre-built?
... Note how I turned the scary negative fact of the RoadMap not being guaranteed, ... We must build systems to model the reality which is a thing much more complex that we can imagine (...it seems that God is smarter than us... ... Ie. to have something called "duck programming". ... Ie. when I look to a code then I must see for ex: lTemp: TStringList; or mDictionary: Map string to string; not to figure out that those arrays and lists are in fact a 'reality workaround' trying to express a list of strings or a map. ... (borland.public.delphi.non-technical) - Re: Request to Andy Robinson and England team
... But reality also being what it is, if you can string some rugby moves ... you will probably beat the higest paid models on the South ... (rec.sport.rugby.union) |
|