基本数据类型 一.整型 如: 18.73.84 整型具备如下功能: class int(object): """ int(x=0) -> int or long int(x, base=10) -> int or long Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion tr…
F-strings 在python3.6.2版本中,PEP 498 提出一种新型字符串格式化机制,被称为“字符串插值”或者更常见的一种称呼是F-strings(主要因为这种字符串的第一个字母是f) 简单了解: ①.F-strings提供了一种明确且方便的方式将python表达式嵌入到字符串中来进行格式化: import math radius = 10 pi = math.pi print(f'Circumference of a circle with radius {radius}:{2*p…