python 学习笔记_1 pip安装、卸载、更新包相关操作及数据类型学习

时间:2021-05-17 21:12:36

'''
prepare_1

pip安装、卸载、更新组件
type 各数据类型
'''

py -3 -m pip
py -3 -m pip list
py -3 -m pip show nose
py -3 -m pip install nose
py -3 -m pip uninstall nose
py -3 -m pip install nose==1.3.6
py -3 -m pip install -U nose
py -3 -m pip install --upgrade nose

>>> a=1
>>> type(a)
<class 'int'>
>>> b='a'
>>> type(b)
<class 'str'>
>>> c=1.2222
>>> type(a)
<class 'int'>
>>> type(c)
<class 'float'>
>>> d=100+33j
>>> type(d)
<class 'complex'>
>>> e=[1,2,3]
>>> type(e)
<class 'list'>
>>> f={1,2,3}
>>> type(f)
<class 'set'>
>>> g={1:2,3:4}
>>> type(g)
<class 'dict'>
>>> h=(1,2,3,4)
>>> type(h)
<class 'tuple'>
>>> i=b'abc'
>>> type(i)
<class 'bytes'>
>>> j='abc'.encode('gbk')
>>> type(j)
<class 'bytes'>