python知识简单总结

上传:chenyi85306 浏览: 15 推荐: 0 文件:PDF 大小:102.07KB 上传时间:2020-12-23 05:23:44 版权申诉
基础 字符串是不可改变的 格式化方法:format() 将一下内容为文件 str_format.py age = 20 name = 'Swaroop' print('{0} was {1} years old when he wrote this book'.format(name, age)) print('Why is {0} playing with that python?'.format(name)) 输出: $ python str_format.py Swaroop was 20 years old when he wrote this book Why is Swaroop
上传资源
用户评论