08 2020 档案

摘要:1、 <! DOCTYPE HTML> 声明文档类型<html> <head> <meta charset = "gb2312"> </head> <body> <h1>春晓<h1> <p> 春眠不觉晓,<br /> 处处闻啼鸟。<br /> 夜来风雨声,<br /> 花落知多少。<br /> </ 阅读全文
posted @ 2020-08-26 12:45 王钻风 阅读(127) 评论(0) 推荐(0) 编辑
摘要:Python 字典 popitem() 方法返回并删除字典中的最后一对键和值。 >>> a = {1:'a',2:'b',3:'c',4:'d'}#创建一个字典>>> key,value = a.popitem()>>> key4>>> value'd'>>> a {1: 'a', 2: 'b', 阅读全文
posted @ 2020-08-21 17:25 王钻风 阅读(95) 评论(0) 推荐(0) 编辑
摘要:>>> import sys>>> print('Python的搜索路径为:%s' % sys.path)Python的搜索路径为:['', 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\ 阅读全文
posted @ 2020-08-21 14:04 王钻风 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-08-17 20:52 王钻风 阅读(146) 评论(0) 推荐(0) 编辑
摘要:chardet是character detct 字符检测的缩写 gb18030是最新的标准,兼容性最好 eg1: >>> import chardet#导入模块>>> import os#导入os模块>>> os.getcwd()#获取当前路径'C:\\Users\\Administrator\\A 阅读全文
posted @ 2020-08-16 19:23 王钻风 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Regular Express正则表达式 用来描述语言规则的语言,通俗讲就是查找文字的语言 标准库Standard library:re eg:>>> import re >>> address = '陕西省西安市未央区 电话:029-99999999 邮编:710000' >>> re.finda 阅读全文
posted @ 2020-08-15 22:04 王钻风 阅读(138) 评论(0) 推荐(0) 编辑
摘要:>>> import requestsTraceback (most recent call last): File "<pyshell#3>", line 1, in <module> import requests File "C:\Users\Administrator\AppData\Loc 阅读全文
posted @ 2020-08-15 17:36 王钻风 阅读(14267) 评论(1) 推荐(3) 编辑
摘要:lambda函数:匿名函数,我理解的函数没有名字 >>> def area(x):#定义一个函数,计算圆形的面积 return(3.14**x) >>> area(5) 305.2447761824001 使用lambd函数定义这个函数 >>> lambda x :3.14**x<function 阅读全文
posted @ 2020-08-15 08:06 王钻风 阅读(107) 评论(0) 推荐(0) 编辑
摘要:>>> dir(list)['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr 阅读全文
posted @ 2020-08-14 19:23 王钻风 阅读(106) 评论(0) 推荐(0) 编辑
摘要:#string的内置方法 >>> dir(str)['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribu 阅读全文
posted @ 2020-08-14 19:16 王钻风 阅读(85) 评论(0) 推荐(0) 编辑
摘要:Python中sequence包括:list、tuple、dict、string 共同特点: (1)、可以通过索引得到一个元素 (2)、索引值从0开始,最后一个是-1 (3)、可以使用分片的方法 。。。。。。。。。。未完待续 阅读全文
posted @ 2020-08-14 19:04 王钻风 阅读(112) 评论(0) 推荐(0) 编辑
摘要:license() >>> license()A. HISTORY OF THE SOFTWARE Python was created in the early 1990s by Guido van Rossum at StichtingMathematisch Centrum (CWI, see 阅读全文
posted @ 2020-08-14 18:53 王钻风 阅读(255) 评论(0) 推荐(0) 编辑
摘要:>>> credits()#学分,弄不懂是什么意思 Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python. 阅读全文
posted @ 2020-08-14 18:52 王钻风 阅读(486) 评论(0) 推荐(0) 编辑
摘要:>>> copyright()Copyright (c) 2001-2020 Python Software Foundation.All Rights Reserved. Copyright (c) 2000 BeOpen.com.All Rights Reserved. Copyright (c 阅读全文
posted @ 2020-08-14 18:49 王钻风 阅读(424) 评论(0) 推荐(0) 编辑
摘要:(1)\help()#帮助 Welcome to Python 3.8's help utility! If this is your first time using Python, you should definitely check outthe tutorial on the Intern 阅读全文
posted @ 2020-08-14 18:48 王钻风 阅读(152) 评论(0) 推荐(0) 编辑
摘要:>>> dir(__builtins__)#Python 内置的函数列表['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'Bu 阅读全文
posted @ 2020-08-12 22:47 王钻风 阅读(162) 评论(0) 推荐(0) 编辑
摘要:import keyword print(keyword.kwlist)#关键字 print(len(keyword.kelist))#本人安装的python版本总共有35个关键字 阅读全文
posted @ 2020-08-12 22:31 王钻风 阅读(191) 评论(0) 推荐(0) 编辑
摘要:1-variable 当你把一个值赋值给一个名字时,他会储存在内存中,把这块内存称之为variable。 注意:Python并不是把值存储在variable中,而是更像把名字贴在值得上面 (1)、在使用variable之前,必须对其赋值 (2)、变量名可以包括字母、数字、下划线,不能已数字开头(据说 阅读全文
posted @ 2020-08-12 19:27 王钻风 阅读(84) 评论(0) 推荐(0) 编辑
摘要:Life is short ,You need Python -- Brce Eckel 这句话是Python社区的名言,翻译过来就是:人生苦短,我用Python。 Python学习就从这一句名言开始,希望自己坚持到底........ 阅读全文
posted @ 2020-08-12 19:11 王钻风 阅读(86) 评论(0) 推荐(0) 编辑
摘要:没看懂,正在研究 阅读全文
posted @ 2020-08-12 19:03 王钻风 阅读(83) 评论(0) 推荐(0) 编辑
摘要:from __future__ import bracesSyntaxError: not a chance 、 语法错误:没有机会 阅读全文
posted @ 2020-08-12 19:01 王钻风 阅读(139) 评论(0) 推荐(0) 编辑
摘要:import __hello__ 阅读全文
posted @ 2020-08-12 18:56 王钻风 阅读(151) 评论(0) 推荐(0) 编辑
摘要:import antigravity 导入 antigravity,浏览器会跳转到一副漫画网页 http://xkcd.com/353/,漫画非常有意思。 暂时还不知道怎么玩,有时间了研究下 阅读全文
posted @ 2020-08-12 18:49 王钻风 阅读(216) 评论(0) 推荐(0) 编辑
摘要:python 之禅 import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. 阅读全文
posted @ 2020-08-12 16:55 王钻风 阅读(223) 评论(0) 推荐(0) 编辑