摘要:
简易版图书管理系统 1 # 用户注册 2 import time 3 4 5 def register(): 6 username = input('请输入用户名:') 7 password = input('请输入密码:') 8 repassword = input('请确认密码:') 9 10 阅读全文
posted @ 2022-03-25 22:06
Ambitious~
阅读(94)
评论(0)
推荐(0)
摘要:
1.strip()函数 strip() 方法用于移除字符串头尾指定的字符(默认为空格或换行符)或字符序列。 注意:该方法只能删除开头或是结尾的字符,不能删除中间部分的字符。 语法结构: str.strip([chars]) 参数 chars -- 移除字符串头尾指定的字符序列。 返回值 返回移除字符 阅读全文
posted @ 2022-03-25 21:28
Ambitious~
阅读(337)
评论(0)
推荐(0)
摘要:
文件操作with open() as 时报错 UnicodeDecodeError: 'gbk' codec can't decode byte 0xa0 in position 22: illegal multibyte sequence 解决办法一:在后面加上文件编码格式encoding = ‘ 阅读全文
posted @ 2022-03-25 20:16
Ambitious~
阅读(1571)
评论(0)
推荐(0)
摘要:
1.单纯复制文件 # 先判断src和target是否是文件夹, # 如果是文件夹,则取出文件夹里面所有的文件(没有文件夹),遍历每一个文件, # 将每一个文件的绝对路径join出来 :E:\p1\girl.jpg 1 src_path = r'E:\p1' 2 target_path = r'E:\ 阅读全文
posted @ 2022-03-25 18:20
Ambitious~
阅读(1538)
评论(0)
推荐(1)

浙公网安备 33010602011771号