Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'string.': 0.05; 'subject:Python': 0.06; 'string': 0.09; 'subject:string': 0.09; 'python': 0.11; 'expression.': 0.16; 'thanks,': 0.17; 'everyone,': 0.19; 'input': 0.22; 'subject:problem': 0.24; 'skip:" 20': 0.27; 'message-id:@mail.gmail.com': 0.30; 'grouping': 0.31; 'operations.': 0.31; 'regular': 0.32; 'skip:& 30': 0.33; 'subject:with': 0.35; 'problem.': 0.35; 'received:google.com': 0.35; 'to:addr:python-list': 0.38; 'list,': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'effective': 0.61; 'regards.': 0.65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=lWAg/3XTFsPu+k4luj/M+Xbn4SsSgLZXIlkO4Hs7jfc=; b=uAQ6X5WjC51PrT22bMe+HKec1t1IGbx/fnX+aQu5vh8lrDJXtLkvFVDIopQYEcf/0C keI9Kw+IAiLyA+mmeshg6gj8bro+GkMPK1QsVI4hLqdIdNskGFtcVM/wqxhGSrXFaDby KrsP4C2x3dQUpSnvRkrEpIC8KuHp/SGBixHmjeco44pUmMy6kDomxG8Nee/qf7LkVaOX Yl+zECgB1bloIdXV+piMLNpyth7R6IDuwOwEORuAtKn06NVI4U7qkK9GcfHT61U7CSUl dzZcDj12sROlzu2ohQ1DAefwysSY2TcPDp8PdcIu36q1hrx4RV7Ra0USBgIGffWNP+cF zG3w== MIME-Version: 1.0 X-Received: by 10.66.149.231 with SMTP id ud7mr13131681pab.8.1389911080334; Thu, 16 Jan 2014 14:24:40 -0800 (PST) Date: Fri, 17 Jan 2014 00:24:40 +0200 Subject: Python solve problem with string operation From: Nac Temha To: python-list@python.org Content-Type: multipart/alternative; boundary=047d7b6d95d0367a3d04f01de490 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389911083 news.xs4all.nl 2882 [2001:888:2000:d::a6]:47287 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64109 --047d7b6d95d0367a3d04f01de490 Content-Type: text/plain; charset=ISO-8859-1 Hi everyone, I want to do operation with chars in the given string. Actually I want to grouping the same chars. For example; input : "344111133311222223377" operation-> (3)(44)(1111)(333)(11)(22222)(33)(77) output: "34131237" How can I do without list, regular expression. just using string operations. Using an effective methods of python for this problem. Thanks, Best regards. --047d7b6d95d0367a3d04f01de490 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi everyone,

I want to do operation with chars in the given string. Actually I want t= o grouping the same chars.

For example;

input : &= quot;344111133311222223377"
operation-> (3)(44)(1111)(333)(11)(22222)(33)(77)
output: "= ;34131237"



How can I do without list, regular exp= ression. just using string operations. Using an effective meth= ods of python for this problem.


= Thanks,
Best regards.
--047d7b6d95d0367a3d04f01de490--