![](https://img-blog.csdnimg.cn/20190918140145169.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
python
python编程
键盘会跳舞
不积跬步,无以至千里
展开
-
python3 字符串format 输出
>>> help(FORMATING) Traceback (most recent call last): File "<pyshell#22>", line 1, in <module> help(FORMATING) NameError: name 'FORMATING' is not d...原创 2020-02-01 10:49:15 · 723 阅读 · 0 评论 -
python 学习笔记01:数据类型和基本操作函数
2018/4/14 python note apple_price = 10 apple_weight = 2 apple_cost = apple_price * apple_weight print(apple_cost) grape_price = 15 grape_weight = 1.5 grape_cost = grape_price * grape_weight print(g...原创 2018-04-15 21:29:20 · 623 阅读 · 0 评论 -
python 学习笔记02:数据类型、格式化输出、运算符和控制流
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Mar 24 12:41:55 2019 @author: sungang """ # 字符串打印 print("hello world") print('hello world') # 多行字符串的可以使用‘’‘ 或者“”“ 来表示 string = \ ''...原创 2019-03-24 19:15:15 · 177 阅读 · 0 评论 -
python 学习笔记03:函数、全局变量和局部变量、文档字符串
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Mar 24 17:55:30 2019 @author: sungang """ # 全局变量:全局(Scope)作用域 x = 10 def count(n = 12): ''' 全局变量与局部变量的使用和区别 global ...原创 2019-03-24 19:19:56 · 320 阅读 · 0 评论 -
python 学习笔记04: list类型的操作
# -*- coding:UTF-8 -*- # list的使用 ''' list 是一个可变的有序表 ============================================= class list(object) | list() -> new empty list | list(iterable) -> new list initialized fro...原创 2019-03-25 16:37:18 · 114 阅读 · 0 评论 -
python 学习笔记05: tuple(元组)类型的操作
# -*- coding:UTF-8 -*- ''' 今天学习python中用数据类型 tuple(元组)。 学习一个类型,最好的办法肯定是了解下这个类型中包含了那些方法与成员变量 然后对每个方法的具体进行调用,业精于去荒于嬉,点滴积累,用久必深 Help on class tuple in module __builtin__: class tuple(ob...原创 2019-03-25 17:23:24 · 232 阅读 · 0 评论 -
python 学习笔记06: dict(字典)类型的操作
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 25 22:04:09 2019 @author: sungang """ ''' 今天学习python中用数据类型 dict(字典)。 学习一个类型,最好的办法肯定是了解下这个类型中包含了那些方法与成员变量 然后对每个方法的具体进行...原创 2019-03-25 22:46:15 · 174 阅读 · 0 评论 -
python 学习笔记07: set(集合)类型的操作
# -*- coding:UTF-8 -*- ''' version: Python2.7.15 set == > 集合学习笔记 ========================================================== Help on class set in module __builtin__: class set(object)...原创 2019-03-26 13:40:22 · 205 阅读 · 0 评论