- 博客(3)
- 收藏
- 关注
原创 python学习三
# 文件的输出注:(1)写文件.Python open() 方法用于打开一个文件,并返回文件对象,在对文件进行处理过程都需要使用到这个函数,如果该文件无法被打开,会抛出 OSError。 (2)使用 open() 方法一定要保证关闭文件对象,即调用 close() 方法。 (3)open() 函数常用形式是接收两个参数:文件名(file)和模式(mode)。#...
2018-11-14 14:47:03 442
原创 python学习二
#1.1 if的用法c = 2if c == 1: print(111)#1.2 if,elif,else的用法c=2if c==1: print (111)elif c == 2: print(222)else: print(333)#1.3 while用法,输出1-10的数c=1while c < 10: c += 1 ...
2018-11-14 14:46:43 132
原创 python学习一
#1.hello world的输出,python中输出是print,不是printfprint("Hello world") 结果显示:hello world#printf("Hello world")NameError: name 'printf' is not defined 注:单行注释用# 多行注释用’‘’ ‘’‘# 1.数字...
2018-11-14 14:45:58 826
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人