Python title() 方法
生活随笔
收集整理的這篇文章主要介紹了
Python title() 方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
描述
Python title() 方法返回"標題化"的字符串,就是說所有單詞都是以大寫開始,其余字母均為小寫。
語法
title() 方法語法:
S.title()參數
- 無。
返回值
返回"標題化"的字符串,就是說所有單詞都是以大寫開始。
實例
以下實例展示了 title() 方法的使用方法:
#!/usr/bin/pythonS = "this is string example from runoob....wow!!!" print (S.title())以上實例輸出結果如下:
This Is String Example From Runoob....Wow!!!轉載于:https://www.cnblogs.com/wushuaishuai/p/7687341.html
總結
以上是生活随笔為你收集整理的Python title() 方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 删除排序数组中的重复数字 II
- 下一篇: websocket python爬虫_p