一、变量
变量:存储数据的容器,我们可以通过变量来操作数据
我们在创建变量时会在内存中开辟一个空间,可以存储不同类型的数据。...>", line 1, in
TypeError: must be str, not int
int() float() str() bool()
int('25')-->25 int...('3.14') float(3)
str(123) str(3.14)
# 需要数字具有字符串的特性时:
a="我的年龄是:"
b=25
>>> a+b
Traceback (most recent...call last):
File "", line 1, in
TypeError: must be str, not int
>>> a+str(b)
'我的年龄是...常用于去重
set([1,2,1,2,1,2])
set(['001','002','003','002'])
list(set([1,2,3,3]))
# 增删查
# 查询数据(list for循环遍历