Just use replace
:
>>> text = raw_input('Enter text: ')
Enter text: iphone 7 black
>>> text.replace(' ', '+')
'iphone+7+black'
2
solved Re-formatting user input with spaces
Just use replace
:
>>> text = raw_input('Enter text: ')
Enter text: iphone 7 black
>>> text.replace(' ', '+')
'iphone+7+black'
2
solved Re-formatting user input with spaces