python学习day2--python基础
python没有常量的定义方式,一般常量可人为用全部大写字母来表示。 如:
MYSQL_CONNECTION='192.168.10.2'
以os库为例:
import os
os.system('ipconfig')
res=os.popen('ipconfig').read()
res
print(res)
以sys 库为例
import sys
sys.path
Python自带了好几百个标准库,还有大量的第三方库,通过以下方式导入:
import 库名
python 安装第三方库(如pandas)
python3 -m pip install pandas
升级pip版本
python3 -m pip install -upgrade pip
python学习day2--python基础的更多相关文章
- python学习Day2 python 、pycharm安装及环境变量配置
复习 进制转换:二进制&十六进制转换(从左往右1248机制,每四位二进制对应一位16进制) 二进制&十进制转换 2n-1幂次方相加 十进制到二进制转化 将十进制除以2,把余数记下 ...
- python学习日记(基础数据类型及其方法01)
数字 int 主要是用于计算的,常用的方法有一种 #既十进制数值用二进制表示时,最少使用的位数i = 3#3的ASCII为:0000 0011,即两位 s = i.bit_length() print ...
- Python学习day16-模块基础
<!doctype html>day16 - 博客 figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { ...
- Python学习day12-函数基础(2)
<!doctype html>day12博客 figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { pos ...
- Python学习day11-函数基础(1)
figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...
- Python学习day05 - Python基础(3) 格式化输出和基本运算符
figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...
- Python学习课程零基础学Python
python学习课程,零基础Python初学者应该怎么去学习Python语言编程?python学习路线这里了解一下吧.想python学习课程?学习路线网免费下载海量python教程,上班族也能在家自学 ...
- Python学习笔记之基础篇(-)python介绍与安装
Python学习笔记之基础篇(-)初识python Python的理念:崇尚优美.清晰.简单,是一个优秀并广泛使用的语言. python的历史: 1989年,为了打发圣诞节假期,作者Guido开始写P ...
- python学习: 优秀Python学习资源收集汇总--转
Python是一种面向对象.直译式计算机程序设计语言.它的语法简捷和清晰,尽量使用无异义的英语单词,与其它大多数程序设计语言使用大括号不一样,它使用縮进来定义语句块.与Scheme.Ruby.Perl ...
- Python学习day09 - Python进阶(3)
figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...
随机推荐
- HttpContext讲解
http://www.cnblogs.com/scy251147/p/3549503.html http://www.360doc.com/content/14/0526/10/17655805_38 ...
- PostgreSQL中如何查询在当前的哪个数据库中
[pgsql@localhost bin]$ ./psql -d tester psql () Type "help" for help. tester=# select curr ...
- 有关java中static关键的重写问题
<Java编程思想>中这样提到“只有普通的方法调用可以是多态的”.说白了,就是静态方法不能实现重写这种多态. JAVA静态方法形式上可以重写(只要子类不加@Override关键字修饰的话, ...
- UOJ 08 Quine 是在下输了
#8. Quine Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://uoj.ac/problem/8 Description 写一个程序,使其能 ...
- delphi Components[i]清除所有edit控件中的内容
(* 一般的清空combobox方法 combobox1.clear; ... combobox9.clear; *) procedure TForm1.Button1Click(Sender: ...
- 169 Majority Element [LeetCode Java实现]
题目链接:majority-element /** * Given an array of size n, find the majority element. The majority elemen ...
- [Effective C++ --030]透彻了解inlining的里里外外
引言 inline函数 在函数声明或定义中函数返回类型前加上关键字inline即把min()指定为内联. inline函数对编译器而言必须是可见的,以便它能够在调用点内展开该函数.与非inline函 ...
- 使用phpExcel向mysql数据库导入excel
使用phpExcel向mysql数据库导入excel from:http://blog.163.com/dustye_l/blog/static/172439513201242491016834/ 使 ...
- 【完结】利用 Composer 完善自己的 PHP 框架(三)——Redis 缓存
本教程示例代码见 https://github.com/johnlui/My-First-Framework-based-on-Composer 回顾 上两篇文章中我们完成了 View 视图加载类和 ...
- Android图片选择器--仿QQ
当做一款APP,需要选择本地图片时,首先考虑的无疑是系统相册,但是Android手机五花八门,再者手机像素的提升,大图无法返回等异常因数,导致适配机型比较困难,微信.QQ都相继的在自己的APP里集成了 ...