Removing whitespace
Given a string, remove leading or trailing whitespaces and return a new string.
Sample Code:
def rmvSpace(str):
# Enter your logic here...
Examples:
Input: 'Tom and Jerry '
Output: 'Tom and Jerry'
Explanation: Whitespaces are removed from both sides of the string.
Input: ' Python '
Output: 'Python'
Explanation: Whitespaces are removed from both sides of the string.