write a program to find 4 character word in string with output by using python
Answers
Answered by
1
The program is :
str=input("Enter the text")
l=str. len()
nstr=""
i=0
while (i<l):
ch=str(i, i+1)
if (ch!=" "):
nstr=nstr+ch
elif (ch==" ")
if (nstr. len()==4):
print("A word with 4-characters length=", nstr)
nstr=""
Answered by
0
Answer:
str=input("Enter the text")
l=str. len()
nstr=""
i=0
while (i<l):
ch=str(i, i+1)
if (ch!=" "):
nstr=nstr+ch
elif (ch==" ")
if (nstr. len()==4):
print("A word with 4-characters length=", nstr)
nstr=""
Explanation:
Similar questions