zaji

print " " 打印 ; # -*- coding:utf-8 -*- ASCii编码错误 ; print "Hens", 25 + 30 / 6 ____ print "Hens %d" %d 注意区别; print """ """ 全部打印;python -m pydoc raw_input 说明;

from sys import argv  script, first, second, third = argv 参数变量,将argv中的东西解包,将所有的参数依次赋值给左边的这些变量;txt_again = open(file_again) print txt_again.read() ;

close read readline truncate write(stuff) 关闭文件 读取文件内容 读取文本文件中的一行 清空文件 将stuff写入文件 ;from os.path import exists 这个命令将文件名字符串作为参数,如果文件存在的话,将返回true,否则返回false ; cat test.txt 显示文件内容 ; 

猜你喜欢

转载自www.cnblogs.com/buzhuoshanyao/p/9358131.html