08.Python-String演算


#String+Stringは数字に似ています

print("Hello, World") == print("Hello" + "World") 

== 
name = input()
print("Hello, " + name)

#複雑なString接続


literal string interpolation
name = input()
print(f"Hello, {name}")
構文の使用の定義
1.print(f"):Pythonはf以降の文字列値を文字列補間として認識する.
    stringの変数を実際の値に変換します.
  • 置換する変数(呼び出しor関数...)かっこ()を使用します.
  • [ TIL 05. Python - Literal String Interpolation ]

    #Whitespaceの識別(インデント)


    PythonはTAB(空間4)サイズに基づくすべてのパーティションに使用される