string.count issue (i'm stupid?)

BartlebyScrivener rpdooling at gmail.com
Mon May 22 12:15:30 EDT 2006


We were doing something like this last week

thestring = "a_a_a_a_"
>>> for x in range(len(thestring)):
... 	try:
... 		thestring.count("_a_", x, x + 3)
... 	except ValueError:
... 		pass




More information about the Python-list mailing list