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


Groups > comp.lang.python > #79175 > unrolled thread

Re: Creating a counter

Started byTerry Reedy <tjreedy@udel.edu>
First post2014-10-15 15:26 -0400
Last post2014-10-15 15:26 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Creating a counter Terry Reedy <tjreedy@udel.edu> - 2014-10-15 15:26 -0400

#79175 — Re: Creating a counter

FromTerry Reedy <tjreedy@udel.edu>
Date2014-10-15 15:26 -0400
SubjectRe: Creating a counter
Message-ID<mailman.14894.1413401709.18130.python-list@python.org>
On 10/15/2014 2:39 PM, Shiva wrote:
> Hi,
>
> I am trying to search a string through files in a directory - however while
> Python script works on it and writes a log - I want to present the user with
> count of number of strings found. So it should increment for each string found.
>
> How do I implement it?

n=0 before the look and
n += 1 withing the loop

-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web