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

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