Python solve problem with string operation
giacomo boffi
pecore at pascolo.net
Thu Jan 16 19:38:02 EST 2014
More information about the Python-list mailing list
Thu Jan 16 19:38:02 EST 2014
- Previous message (by thread): Python solve problem with string operation
- Next message (by thread): Python solve problem with string operation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
giacomo boffi <pecore at pascolo.net> writes: > % python a.py > 34131237 % cat a.py i="344111133311222223377";n=0 while n+1!=len(i):i,n=(i[:n]+i[n+1:],n) if i[n+1]==i[n] else (i,n+1) print i % python a.py 34131237 % -- for Nikos
- Previous message (by thread): Python solve problem with string operation
- Next message (by thread): Python solve problem with string operation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list