题解 | #学生基本信息输入输出#
学生基本信息输入输出
http://www.nowcoder.com/practice/58b6a69b4bf943b49d2cd3c15770b9fd
re.split拆分输入字符,round取四舍五入
import re
line=input()
list=re.split("[;,]",line)
score1=round(float(list[1])+0.0001,2)
score2=round(float(list[2])+0.0001,2)
score3=round(float(list[3])+0.0001,2)
print("The each subject score of No. {} is {:.2f}, {:.2f}, {:.2f}.".format(list[0],score1,score2,score3))