![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python基础
weixin_44150147
这个作者很懒,什么都没留下…
展开
-
Python基础三
任务三 1. dict字典 a. 定义 字典是由key:value 构成,无序结构。 b. 创建 # 创建:基本是 JSON 串、可嵌套 program={ 'C++':'good', 'Java':'well', 'Python':['perfect', 'powerful'], 'other':{ 'php':'easy', 'C#':'windows' } } c. 字典的方法 #...原创 2019-04-05 11:25:21 · 116 阅读 · 0 评论 -
Python基础四
函数基础 1. 函数关键字 关键字是python内置的,具有特殊意义的标识符,自定义标识符命名时不可与之重复。 import keyword print(keyword.kwlist) [‘False’, ‘None’, ‘True’, ‘and’, ‘as’, ‘assert’, ‘break’, ‘class’, ‘continue’, ‘def’, ‘del’, ‘elif’, ‘e...原创 2019-04-06 18:35:19 · 108 阅读 · 0 评论 -
python基础任务1
环境搭建 a) anaconda环境配置 b) 解释器 用Intellij IDEA python初体验 a) print and input python基础讲解 a) python变量特性: id:id(变量名) type:type(变量名) value: 变量名 命名规则: 标示符可以由 字母、下划线 和 数字 组成,不能以数字开头,不能与关键字重名。 b) 注释方法 单行注释...原创 2019-04-01 17:33:03 · 104 阅读 · 0 评论 -
Python基础
Python基础二 1. 列表 a. 标志:用[]表示 b. 基本操作(创建,append( ),pop( ) ,del( ), 拷贝) nums = [1, 2, 3, 4] nums.append(5) #使用 append() 添加元素 nums = [1, 2, 3, 4] nums.pop() #默认-1 nums = [1, 2, 3, 4] nums.del[1] #del:根据...原创 2019-04-02 17:18:14 · 121 阅读 · 0 评论 -
啥是佩奇代码复现
#!/usr/bin/python # -*- coding: UTF-8 -*- # 哆啦A梦 import turtle def flyTo(x, y): turtle.penup() turtle.goto(x, y) turtle.pendown() def drawEye(): turtle.tracer(False) a = 2.5 ...原创 2019-04-11 21:10:44 · 1232 阅读 · 0 评论 -
Python基础(五)
1.file a.打开文件方式(读写两种方式) b.文件对象的操作方法 c.学习对excel及csv文件进行操作 2.os模块 3.datetime模块 4.类和对象 5.正则表达式 6.re模块 7.http请求 1.file a.打开文件方式(读写两种方式) b.文件对象的操作方法 c.学习对excel及csv文件进行操作 f = open("test.txt","r") #打开文件 fr...原创 2019-04-09 19:42:22 · 123 阅读 · 0 评论