def strUpLow(s): n = 0 for a in s: if n == 0: b = s[n].upper() else: b += s[n].lower() n += 1 print b 测试: