python里使用capwords()函数来把字符里每一个英语单词首字母变大写
2023-09-14 09:10:35 时间
如果不使用这个函数,需要把字符串使用split()函数进行分割成列表,最后依次对每个单词的首字母变成大写,再使用join()函数来组合出来。
输出如下:五子棋游戏开发
http://edu.csdn.net/course/detail/5487
使用这个函数就更简单:
import string
s = 'The quick brown fox jumped over the lazy dog.'
print(s)
print(string.capwords(s))
输出如下:
The quick brown fox jumped over the lazy dog.
The Quick Brown Fox Jumped Over The Lazy Dog.
Python游戏开发入门
你也能动手修改C编译器
纸牌游戏开发
http://edu.csdn.net/course/detail/5538
五子棋游戏开发
http://edu.csdn.net/course/detail/5487
RPG游戏从入门到精通
http://edu.csdn.net/course/detail/5246
WiX安装工具的使用
http://edu.csdn.net/course/detail/5207
俄罗斯方块游戏开发
http://edu.csdn.net/course/detail/5110
boost库入门基础
http://edu.csdn.net/course/detail/5029
Arduino入门基础
http://edu.csdn.net/course/detail/4931
Unity5.x游戏基础入门
http://edu.csdn.net/course/detail/4810
TensorFlow API攻略
http://edu.csdn.net/course/detail/4495
TensorFlow入门基本教程
http://edu.csdn.net/course/detail/4369
C++标准模板库从入门到精通
http://edu.csdn.net/course/detail/3324
跟老菜鸟学C++
http://edu.csdn.net/course/detail/2901
跟老菜鸟学python
http://edu.csdn.net/course/detail/2592
在VC2015里学会使用tinyxml库
http://edu.csdn.net/course/detail/2590
在Windows下SVN的版本管理与实战
http://edu.csdn.net/course/detail/2579
Visual Studio 2015开发C++程序的基本使用
http://edu.csdn.net/course/detail/2570
在VC2015里使用protobuf协议
http://edu.csdn.net/course/detail/2582
在VC2015里学会使用MySQL数据库
http://edu.csdn.net/course/detail/2672
相关文章
- Python 虚拟环境 Virtualenv 分别在 Windows 和 Linux 上的安装和使用
- Python多线程通信_python socket多线程
- python中pygame怎么安_Python中pygame安装方法图文详解
- Python入门系列(五)一篇搞懂python语句
- Python入门系列(六)一篇学会python函数
- python中sqrt函数用法_Python : sqrt() 函数
- python chr()和ord()_Python函数ord
- 树莓派3B+ python 实时监控(USB摄像头)并显示
- python抛出异常和捕获异常_Python异常
- linux防挂马软件,Linux利用Python脚本检测网站挂马程序
- Python列表常用的函数和方法(3)_Python自学第二十二节
- 搭建python开发环境-c++教程 如何搭建Python开发环境?
- python中 itertools模块的使用方法
- Python 接口测试之Excel表格数据操作方法封装
- Python find()方法:检测字符串中是否包含某子串
- 使用python smtplib库发邮件添加cc,bcc详解编程语言
- Python学习:6.python内置函数详解编程语言
- python基础1之python介绍、安装、变量和字符编码、数据类型、输入输出、数据运算、循环详解编程语言
- Python结合MySQL实现信息交互(python与mysql交互)
- 从Python连接Oracle数据库介绍(python连接oracle)
- Python中使用MySQL数据库的操作技巧(mysql_python)
- python编程-将Python程序转化为可执行程序[整理]
- python从远程服务器下载东西的代码