摘要: 简介f-string,亦称为格式化字符串常量(formatted string literals),是Python3.6新引入的一种字符串格式化方法,该方法源于PEP 498 – Literal String Interpolation,主要目的是使格式化字符串的操作更加简便。f-string在形式 阅读全文
posted @ 2020-05-27 16:26 tooltime 阅读(24230) 评论(1) 推荐(0) 编辑
摘要: 这个函数很简单,就不写例子了,看看语法,拿来即用 python range() 函数可创建一个整数列表,一般用在 for 循环中。 函数语法 range(start, stop[, step]) 参数说明: start: 计数从 start 开始。默认是从 0 开始。例如range(5)等价于ran 阅读全文
posted @ 2020-05-27 16:00 tooltime 阅读(866) 评论(0) 推荐(0) 编辑