執行 ❯
擁有你自己的 Python 伺服器
×
更改方向
更改主題,深色/淺色
前往 Spaces
#named indexes: txt1 = "My name is {fname}, I'm {age}".format(fname = "John", age = 36) #numbered indexes: txt2 = "My name is {0}, I'm {1}".format("John",36) #empty placeholders: txt3 = "My name is {}, I'm {}".format("John",36) print(txt1) print(txt2) print(txt3)
我的名字是約翰,我36歲了
我的名字是約翰,我36歲了
我的名字是約翰,我36歲了