Skip to content

Instantly share code, notes, and snippets.

@logicjwell
Created April 30, 2019 12:26
Show Gist options
  • Save logicjwell/b2f506a07ff1edcc37dec6b7a590e0ab to your computer and use it in GitHub Desktop.
Save logicjwell/b2f506a07ff1edcc37dec6b7a590e0ab to your computer and use it in GitHub Desktop.
[python 数据类型] #python #数据结构
bol = True # 布尔
num = 100000000; # 数字
num2 = 0.0000001; # 数字
str = "fangbei"; # 字符串
str_cn = u"你好,比特币"; # 字符串 中文unicode
list = [1, 2, 3, 3, 'fangbei']; # 列表,方括号,可重复,元素类型可不同
tuple = ('shenzhen', 'beijing', '0755', '0755'); # 元组,小括号,和列表相似,但内容不可修改!
dict = {'name': "fangbei", 'age': 28}; # 字典,大括号,存储键值对,类似json
set = set(['fang', 'bei', 'm']); # 集合,用于去重
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment