Add word_count solution
This commit is contained in:
parent
9c73711444
commit
f83828a180
8
u4/word_count.py
Normal file
8
u4/word_count.py
Normal file
@ -0,0 +1,8 @@
|
||||
def word_count(phrase):
|
||||
slovnik1 = []
|
||||
slova = phrase.lower().split()
|
||||
for gns in slova:
|
||||
cisteslovo = gns.strip(".,!:;?'\"")
|
||||
if cisteslovo:
|
||||
slovnik1.append(cisteslovo)
|
||||
return slovnik1
|
||||
Loading…
Reference in New Issue
Block a user