题解P| #格式化输出(一)#
格式化输出(一)
https://www.nowcoder.com/practice/fe82dc48f4f04b2397a85fb1bdbe34a2
name=input() # 方法1 # print('I am {} and I am studying Python in Nowcoder!'.format(name)) # 方法2:位置一一对应 # print('I am {0} and I am studying Python in Nowcoder!'.format(name)) # 方法3:参数 # print('I am {A} and I am studying Python in Nowcoder!'.format(A=name)) # 方法4:文本用 %s 占位符 print('I am %s and I am studying Python in Nowcoder!'%name)