(Learner-here) Lists + Functions = headache
Bradley Wright
bradley.wright.biz at gmail.com
Sun May 5 20:59:15 EDT 2013
Hey guys and gals doing this tutorial(codecademy) and needed a bit help from the experienced.
I'm writing a function that takes a list(one they supply during runtime)
here's what my function is supposed to do
1. for each instance of the string "fizz" make a count
2. Finally return that count
here's my code:
def fizz_cout(x):
count = 0
for item in x:
while item == "fizz":
count += 1
return count
Please remember that i am a eager beginner, where am i going wrong?
More information about the Python-list
mailing list