print format
Posted dulun
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了print format相关的知识,希望对你有一定的参考价值。
name = ‘jack‘ age = 18 sex = ‘man‘ job = "IT" salary = 9999.99 print(f‘my name is name.capitalize().‘) print(f‘I am age:*^10 years old.‘) print(f‘I am a sex‘) print(f‘My salary is salary:10.3f‘) # 结果 my name is Jack. I am ****18**** years old. I am a man My salary is 9999.990
print(f‘XXXX‘)要使用python3.6及以上,否则会报错invalid syntax.
以上是关于print format的主要内容,如果未能解决你的问题,请参考以下文章
Convert between cv::Mat and QImage 两种图片类转换