python字符串系列--2

#!/usr/bin/python
#coding=utf-8
first_name='tiger'
last_name='gao'
full_name= f"{first_name} {last_name}"--f为format的缩写
print(full_name)
print(full_name.title())--title将首字母转换为大写
print(full_name.upper())--全值字符串转换大写
print(full_name.lower())--全值字符串转换小写
print(f"hello python,{full_name}")--format拼接

  

 

 

posted @ 2020-12-26 21:59  tigergaonotes  阅读(48)  评论(0编辑  收藏  举报