Computer Science, asked by tannuatkaan, 3 months ago

which function is used to get string with leading and trailing whitespace is removed options is split, strip , partition , join​

Answers

Answered by Anonymous
1

Answer:

Python String strip() The Python strip() string method is used to remove/strip any given character or substring from the leading and trailing characters(substring) of a given string.

Answered by pragyakirti12345
0

Answer: strip()

Concept :  Python Functions

Given : split(), strip(), partition(), join()

To Find : Which function is used to get string with leading and trailing

               whitespace is removed

Explanation:

To remove all the leading and trailing whitespaces in string, strip() is used in Python. In String class, strip() is present which can remove all the trailing and leading whitespaces in a string. strip() is of two kinds - lstrip().  lstrip() function is used to remove the leading whitespaces in string and rstrip() is used to remove the trailing whitespaces in string.

#SPJ3

Similar questions