The + operator combines two strings into a new string
def concat1(s1, s2):
result = s1 + s2
return result
| Function Call | Return Value | |||
|---|---|---|---|---|
| concat1('Car', 'wash') | → | |||
| concat1('Hello', ' world') | → | |||
| concat1('5', '8') | → | |||
| concat1('Snow', 'ball') | → | |||
| concat1('Rain', 'boots') | → | |||
| concat1('Reading', 'bat') | → | |||
| concat1('', 'Hi') | → | |||
| concat1('', '') | → | |||
| concat1(' ', ' ') | → | |||
Experiment with this code on Gitpod.io