Q. What does the `strip()` method do?

  • (A) Removes internal spaces
  • (B) Removes trailing spaces
  • (C) Removes leading and trailing spaces
  • (D) Replaces spaces with underscores
πŸ’¬ Discuss
βœ… Correct Answer: (C) Removes leading and trailing spaces
Explanation: `strip()` removes both leading and trailing whitespace from a string.
Explanation by: Mr. Dubey
`strip()` removes both leading and trailing whitespace from a string.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
92
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate