python

** 安装模块

  • 使用pip安装包
    1
    2
    3
    4
    5
    6
    7
    pip install numpy
    python // 进入交互式命令行
    type(变量) // 查看变量的类型
    dir(variable) // 查看变量的属性
    hasattr(variable, attribute) // 查看变量是否有某种属性
    Ctrl+D // 退出交互式命令行