1. 慎用小写字母l和大写字母O,因为它们可能被人看成数值1和0.
  2. 应使用小写的python变量名。

字符串

在python中,用引号括起来的都是字符串,其中的引号可以是单引号和双引号。

“This is a string”
'This is also a string'

首字母变大写

利用title方法实现

1 name = "aaron"
2 print(name.title())
title

相关文章:

  • 2021-11-07
  • 2021-12-15
  • 2021-07-01
  • 2021-06-15
  • 2021-07-11
  • 2022-01-10
  • 2021-05-13
  • 2021-09-23
猜你喜欢
  • 2021-04-12
  • 2021-12-23
  • 2021-12-02
  • 2021-09-26
  • 2021-12-13
相关资源
相似解决方案