zoukankan      html  css  js  c++  java
  • python 学习笔记_1 pip安装、卸载、更新包相关操作及数据类型学习

    '''
    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'>

  • 相关阅读:
    C语言的异常处理
    单例类模板
    智能指针模板
    数组类指针
    类模板
    函数模板
    shell 修改工作路径
    把目录C:Python34PCI_Codechapter2加到系统路径中
    twoSum
    归并排序
  • 原文地址:https://www.cnblogs.com/xiaoxiao075/p/10032481.html
Copyright © 2011-2022 走看看