摘要: Python 是如何执行的?执行顺序是怎么样? 至上而下,逐行执行 #!usr/bin/env python # -*- coding:utf-8 _*- """ # author: 小菠萝测试笔记 # blog: https://www.cnblogs.com/poloyy/ # time: 20 阅读全文
posted @ 2021-07-18 21:54 小菠萝测试笔记 阅读(3516) 评论(0) 推荐(2) 编辑
摘要: 导入的是什么 导入是将 Python 的一些功能函数放到当前的脚本中使用 不导入的功能无法直接在当前脚本使用(除了 python 自带的内置函数) Python 有很多第三方功能,假设想要使用,都必须导入才能使用 为什么需要导入 假设有两个 python 文件,a.py,b.py a 文件想调用 b 阅读全文
posted @ 2021-07-18 20:58 小菠萝测试笔记 阅读(3402) 评论(0) 推荐(1) 编辑
摘要: 背景 写 python 的时候,基本都要加两个头部注释,这到底有啥用呢? #!usr/bin/env python # -*- coding:utf-8 _*- print("hello-world") python 头部注释的作用 头注释并不是为代码而服务,更多是被系统或解释器所调用 会告诉系统 阅读全文
posted @ 2021-07-18 18:24 小菠萝测试笔记 阅读(4632) 评论(7) 推荐(8) 编辑
摘要: 前言 字符串是编程中最重要的数据类型,也是最常见的 字符串的表示方式 单引号 ' ' 双引号 " " 多引号 """ """" 、 ''' ''' print("hello world") print('hello world') print("""hello world""") # 输出结果 he 阅读全文
posted @ 2021-07-18 17:33 小菠萝测试笔记 阅读(2165) 评论(1) 推荐(2) 编辑
摘要: Number 数字,是一个大的分类,细分四小类 整数:int 浮点数:float 布尔:bool 复数:complex int 的栗子 print(type(-1)) print(type(1)) print(type(-999999999999999)) print(type(9999999999 阅读全文
posted @ 2021-07-18 14:55 小菠萝测试笔记 阅读(2526) 评论(0) 推荐(2) 编辑