|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
join , split questionHello,
i have some text file list such like following format. i want to change text format to other format. i was upload it pastebin site http://elca.pastebin.com/d71261168 if anyone help ,much appreciate thanks in advance |
|
|
|
|
|
Re: join , split question>> Hello, i have some text file list such like following format.
>> i want to change text format to other format. >> i was upload it pastebin site >> http://elca.pastebin.com/d71261168 > Dead link. > With what ? http://elca.pastebin.com/d4d57929a :) -- http://mail.python.org/mailman/listinfo/python-list |
|
|
|
|
|
Re: join , split questionOn Nov 5, 2:08 pm, Bruno Desthuilliers <bruno.
42.desthuilli...@...> wrote: > Stuart Murray-Smith a écrit : > > >>> Hello, i have some text file list such like following format. > >>> i want to change text format to other format. > >>> i was upload it pastebin site > >>>http://elca.pastebin.com/d71261168 > > >> Dead link. > > >> With what ? > > >http://elca.pastebin.com/d4d57929a > > Yeah, fine. And where's the code you or the OP (if not the same person) > have problems with ? I'd certainly be curious to see it, especially with the pagecheck() line 22 @ http://elca.pastebin.com/f5c69fe41 -- http://mail.python.org/mailman/listinfo/python-list |
|
|
|
|
|
Re: join , split questionOn 11月6日, 上午8时34分, metal <metal...@...> wrote:
> On 11月4日, 下午5时39分, elca <high...@...> wrote: > > > Hello, > > i have some text file list such like following format. > > i want to change text format to other format. > > i was upload it pastebin sitehttp://elca.pastebin.com/d71261168 > > > if anyone help ,much appreciate thanks in advance > > -- > > View this message in context:http://old.nabble.com/join-%2C-split-question-tp26193334p26193334.html > > Sent from the Python - python-list mailing list archive at Nabble.com. > > s = """uji708 > uhodih > utus29 > agamu4 > azi340 > ekon62 > """ > > from itertools import cycle > for i, x in zip(cycle(range(3)), s.splitlines()): > print x + ',', > if i == 2: > > """ > uji708, uhodih, utus29, > agamu4, azi340, ekon62, > """ yet another version, a little evil s = """uji708 uhodih utus29 agamu4 azi340 ekon62 """ from itertools import * print '\n'.join(','.join(x for i, x in g) for k, g in groupby(enumerate (s.splitlines()), lambda (i, x): i/3)) """ uji708,uhodih,utus29 agamu4,azi340,ekon62 """ -- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: join , split questionthanks all! i was resolved :) |
| Free embeddable forum powered by Nabble | Forum Help |