Python: for loop - print on the same line,print(' '.join([function(word) for word in split]))