# -*- coding: utf-8 -*-
#python 27
#xiaodeng
#python之函数用法capitalize()


#capitalize()
#说明:将字符串的第一个字母变成大写,其他字母变小写。
'''
capitalize(...)
    S.capitalize() -> string
    
    Return a copy of the string S with only its first character
    capitalized.
'''



#案例
str='xiaodeng'
print str.capitalize()#Xiaodeng

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-07
  • 2021-12-23
  • 2021-12-05
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案