Python 中 main 语句的作用整理: 1、Python 语句中可以不包含主函数 main 函数; 2、if __name__=='__main__' 语句是为了自我调试代码方便,作为执行程序的入口,在 Python 脚本作为 module 被 import 时该语句下代码不运行; 下面编写两 Read More
posted @ 2021-08-24 15:57 史迪仔_lmj Views(8514) Comments(0) Diggs(0) Edit
文章转载自:https://zhuanlan.zhihu.com/p/102331478 很多初学的小伙伴们,在学到“类”的时候,就开始烦迷糊了。“类”到底是个什么东西,是用来干嘛的?然后就疯狂百度搜索,搜出了很多。一看回答,很多都是在扯什么面向对象,还讲了一堆稀奇古怪的概念,看了反而更迷糊了。。 Read More
posted @ 2021-08-24 11:27 史迪仔_lmj Views(436) Comments(0) Diggs(0) Edit
原文链接: https://blog.csdn.net/qiqicos/article/details/79200089 https://blog.csdn.net/elevenqiao/article/details/6796653 with…as,就是个python控制流语句,像 if ,whi Read More
posted @ 2021-08-24 10:20 史迪仔_lmj Views(839) Comments(0) Diggs(0) Edit