摘要:
恢复内容开始 0: import os all_files = os.listdir(os.curdir) type_dict = {} type_dict['文件夹'] = 0 for each in all_files: if os.path.isdir(each): type_dict['文件 阅读全文
摘要:
file_name = input('请输入文件名:') print('请输入内容,单独输入“:w” 保存退出:') f = open(file_name,'w') text =input() while text != ':w': f.write(text+'\n') text =input() 阅读全文
摘要:
0:十转2 def my_bin(x): a ='' if x : a = my_bin(x//2) return a+str(x%2) else: a+='0b' return a print(my_bin(20)) 1:分十位 def get_digits(n): a = [] if n: a 阅读全文