摘要:
1、文件的读写权限 2、指针的运用f.seek(0)、告诉我们当前指针的位置f.tell() 阅读全文
摘要:
A=['hello','world',1,2,3]for i in A: print('正常输出i的值:',i) #打印出来的是换行展示hello world 1 2 3 print('加入sep后i的值:',i,sep='***') #所有的值前面都加上sep的值,换行展示***hello *** 阅读全文
摘要:
比如st1='abc,def,ghi'st2=st1[0] #取角标为0的字符串st3=st1[3:5] #取角标为第3位开始总共2位的字符串 st4=st1[2:3] #取角标为第2位开始,共1位的字符串print(st2) #打印出来的是aprint(st3) #打印出来的是,dprint(st 阅读全文