Python 字符串内置方法学习

  def capitalize(self): # real signature unknown; restored from __doc__
        """
        S.capitalize() -> str
        
        Return a capitalized version of S, i.e. make the first character
        have upper case and the rest lower case.
        """
        return ""
首字母大写
name = str('xiongchaoyuan')
print(name.capitalize())
Xiongchaoyuan
posted @ 2017-11-27 20:19  xiongcy  阅读(156)  评论(0)    收藏  举报