Python の文字列を連結する:半角スペースの使い方

Pythonでは文字列をプラス記号で連結することができます。

a = 'hello'
b = 'world'

print(a + b) # helloworld

半角スペースを空ける

変数に文字列を代入するとき、半角スペースで区切ってもそのまま連結されます。

a = 'hello' 'world'

print(a) # helloworld