CBSE Class 11 Computer Science Question 50 of 91

String Manipulation — Question 10

Back to all questions
10
Question

Question 10

Which functions would you choose to use to remove leading and trailing white spaces from a given string?

Answer

lstrip() removes leading white-spaces, rstrip() removes trailing white-spaces and strip() removes leading and trailing white-spaces from a given string.

Answer