Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64130

Re: Python solve problem with string operation

Newsgroups comp.lang.python
Date 2014-01-16 17:36 -0800
References <mailman.5607.1389911083.18130.python-list@python.org>
Message-ID <46ac774f-02c7-4dc7-993e-9880b22cbb73@googlegroups.com> (permalink)
Subject Re: Python solve problem with string operation
From Asaf Las <roegltd@gmail.com>

Show all headers | View raw


inpu = "344111133311222223377"
tstr = inpu[0]
for k in range(1, len(inpu)):
    if inpu[k] != inpu[k-1] :
        tstr = tstr + inpu[k] 

print(tstr)

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Python solve problem with string operation Nac Temha <naccttemha@gmail.com> - 2014-01-17 00:24 +0200
  Re: Python solve problem with string operation John Gordon <gordon@panix.com> - 2014-01-16 22:30 +0000
    Re: Python solve problem with string operation Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-16 22:48 +0000
      Re: Python solve problem with string operation John Gordon <gordon@panix.com> - 2014-01-16 22:58 +0000
  Re: Python solve problem with string operation giacomo boffi <pecore@pascolo.net> - 2014-01-17 01:17 +0100
    Re: Python solve problem with string operation giacomo boffi <pecore@pascolo.net> - 2014-01-17 01:38 +0100
  Re: Python solve problem with string operation Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-17 00:30 +0000
  Re: Python solve problem with string operation "Rhodri James" <rhodri@wildebst.org.uk> - 2014-01-17 01:05 +0000
  Re: Python solve problem with string operation Asaf Las <roegltd@gmail.com> - 2014-01-16 17:36 -0800

csiph-web