0
Which method can be used to remove any whitespace from both the beginning and the end of a string?
3 odpowiedzi
0
If str is your string variable 
Check for 
   str.strip()
https://docs.python.org/2/library/stdtypes.html#str.strip
0
Prokopios Poulimenos It is not recommended to use functions (e.g. str) as variable names as it can mess up with your code. 
Python 3 Documentation.
https://docs.python.org/3/library/stdtypes.html#str.strip
0
@Diego
It was just an example.






