problem with for and if

2015-01-05 Thread Dariusz Mysior
I want search count of szukana in zmienna but code below counting all 12 letters from "traktorzysta" word szukana="t" zmienna="traktorzysta" def gen(): count=int(0) for a in zmienna: if szukana in zmienna: count+=1 else: continue return count

Re: problem with for and if

2015-01-05 Thread Dariusz Mysior
W dniu poniedziałek, 5 stycznia 2015 15:28:07 UTC+1 użytkownik Dariusz Mysior napisał: > I want search count of szukana in zmienna but code below counting all 12 > letters from "traktorzysta" word > > szukana="t" > zmienna="traktorzysta" > &