摘要:
alist = [1,2,3,'bob','alice'] print(alist) alist[0] = 10 print(alist) alist[1:3] = [20,30] print(alist) alist[2:2] = [22,24,26,28] print(alist) alist.append(100) print(alist) alist.remove(24) pr... 阅读全文
摘要:
import os def get_fname(): while True: fname = input('filename: ') if not os.path.exists(fname): break print('%s already exists. Try again' % fname) ... 阅读全文