Write a program for a basic string extraction.
The program should:
Remember:
CODE IN PYTHON:
#taking a string as input from the user
str = raw_input("Enter a string:")
output = ""
#extracting only string
for ch in str:
if((ch >= 'a' and ch <='z') or (ch >= 'A' and ch <='Z')
or (ch >= '0' and ch<='9') or ch==' '):
output += ch
#displaying the output
print(output)
INDENTATION:
Get Answers For Free
Most questions answered within 1 hours.