pset1/problem2.py
def count_bob(s):
	"""Return number of occurrences of `bob`

	Including partial occurrences, like "bobob" which is 2.

	"""

	count = 0
	for i in xrange(max(0, len(s) - 2)):
	  count += s[i:i + 3] == 'bob'
	print 'The number of times bob occurs is: %i' % count
	return count
Return number of occurrences of `bob`

	Including partial occurrences, like "bobob" which is 2.

	
Return number of occurrences of `bob`
Including partial occurrences, like "bobob" which is 2.
Return number of occurrences of ` bob ` Including partial occurrences like " bobob " which is 2 .
def count_bob(s):
	count = 0
	for i in xrange(max(0, len(s) - 2)):
	  count += s[i:i + 3] == 'bob'
	print 'The number of times bob occurs is: %i' % count
	return count
def count_bob ( s ) : count = 0 for i in xrange ( max ( 0 , len ( s ) - 2 ) ) : count += s [ i : i + 3 ] == 'bob' print 'The number of times bob occurs is: %i' % count return count
Return number of occurrences of `bob`
Including partial occurrences, like "bobob" which is 2.
Return number of occurrences of ` bob ` Including partial occurrences like " bobob " which is 2 .
"""Return number of occurrences of `bob`

	Including partial occurrences, like "bobob" which is 2.

	"""
s