Python的我當前的代碼是:如何把2個變量一起
Import random
Import sys
Import os
Print ("Hello! What is your name traveller?")
name = sys.stdin.readline()
training = ",we are in peril! Start your training
now!"
first_mission = (name + training)
Print (first_mission)
然後運行是這樣的:(例如角色:Dave)
Dave
,We are under peril! Start your training now!
我如何使它像這樣運行:
Dave , We are under peril! Start your training now!
謝謝!
是不是有一個原因,你不只是使用內置的輸入函數來獲取名稱? – Kurt