Python Programming - Console Input/Output - Discussion
Discussion Forum : Console Input/Output - General Questions (Q.No. 66)
66.
How can you read a string from the console, replace all spaces with underscores, and print the result?
Answer: Option
Explanation:
To read a string from the console, replace all spaces with underscores, and print the result, use
string_input = input("Enter a string: "); print(string_input.replace(" ", "_"))
.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers