python(1) python基础
2015-10-20 03:51
537 查看
趁mid-term的时机,总结之前Python学习遇到的问题和一些点~程序媛从零开始,学的是廖雪峰的python 2.7~
1. 更有可读性
print 方法,print "the content you would like to print, perheps some hints", variable
raw_input 方法,new = raw_input("some hints" )
注意读取的永远是字符串
2. 格式:
缩进问题!统一空格或者tab用法,或者至少设置好tab width = 4 用缩进来表示一个语句块
“:”问题
备注问题
大小写敏感
r‘‘‘ ’’’表示内容中多次换行
3. 输出格式化字符串
4. Ctrl + C强行退出进程
1. 更有可读性
print 方法,print "the content you would like to print, perheps some hints", variable
raw_input 方法,new = raw_input("some hints" )
注意读取的永远是字符串
2. 格式:
缩进问题!统一空格或者tab用法,或者至少设置好tab width = 4 用缩进来表示一个语句块
“:”问题
备注问题
大小写敏感
r‘‘‘ ’’’表示内容中多次换行
3. 输出格式化字符串
"Hello, I'm %s" %'Chloe'%s->String %d->Integer %f->Float %x->Hexadecimal integer
4. Ctrl + C强行退出进程
相关文章推荐
- python基础入门详解(文件输入/输出 内建类型 字典操作使用方法)
- python基础
- python命名规则
- python对象类型
- Python学习igraph
- 函数的定义与调用
- Python基础1--变量类型
- 【Python基础】之has_key(key) or key in d
- 【Python基础】之对字典进行排序操作(sort by the values of dict)
- 【Python基础】之全局变量(UnboundLocalError: local variable referenced before assignment)
- 【Python基础】之set, list, dictionary
- 【Python基础】之copy and deepcopy
- python学习笔记-2变量
- python学习笔记-3运算符与表达式
- python学习笔记4-数据类型-数字
- python学习笔记06-列表
- python学习笔记7-字典
- Python 变量类型
- Python 基础
- Python:基础知识