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
print("Literka '",szukana,"' w słowie ",zmienna,
"wystąpiła ",gen()," razy")
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/5a41304b-0d6b-424a-a284-cc64cfeac08c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.