Discuss / Python / 作业一

作业一

Topic source

格林匹思

#1 Created at ... [Delete] [Delete and Lock User]

def normalize(name): s=name s=s.lower() l1=chr(ord(s[0])-32)#把第一个小写字母对应的大写字母算出来,ASCII码差32 s=l1+s[1:]#把大写字母放到最前面 return s


  • 1

Reply