In Python language, which of the following is correct for ‘strip ( )’ function?

2024

In Python language, which of the following is correct for ‘strip ( )’ function?

  1. A.

    In returns the string by removing trailing and leading white spaces

  2. B.

    It returns a list from the string depending upon the delimiter that we specify

  3. C.

    It returns the power of values passed

  4. D.

    It returns the string with the first character in upper case and lowering the case for rest of the string

Attempted by 99 students.

Show answer & explanation

Correct answer: A

`strip()` returns a string after removing leading and trailing white spaces.

Explore the full course: Rssb Senior Computer Instructor