這樣問題和正確答案寫法不一樣。
我感覺自己這腦子越學越笨了。這么簡單問題居然給我復雜化了。 def firstCharUpper(s): ? ?for i in s[:1]: ? ? ? ?x=i.upper() ? ?return x+s[1:] print firstCharUpper('hello') print firstCharUpper('sunday') print firstCharUpper('september')
我感覺自己這腦子越學越笨了。這么簡單問題居然給我復雜化了。 def firstCharUpper(s): ? ?for i in s[:1]: ? ? ? ?x=i.upper() ? ?return x+s[1:] print firstCharUpper('hello') print firstCharUpper('sunday') print firstCharUpper('september')
2015-05-19
舉報
2015-06-21
你不是一個人