为什么不能直接赋值?
def firstCharUpper(s):
return s[0:1]=s[0:1].upper()
print firstCharUpper('hello')
print firstCharUpper('sunday')
print firstCharUpper('september')
def firstCharUpper(s):
return s[0:1]=s[0:1].upper()
print firstCharUpper('hello')
print firstCharUpper('sunday')
print firstCharUpper('september')
2018-05-22
举报