Skip to content

Commit b5ff376

Browse files
authored
Create count_words.py
1 parent 2f982c2 commit b5ff376

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

count_words.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def count_words(word):
2+
string=word
3+
b=string.split(" ")
4+
print("word",len(b))
5+
replac=string.replace(" ","")
6+
print("elemts",len(replac))
7+
count_words("I love learning")

0 commit comments

Comments
 (0)