摘要:
给定一个非负整数 numRows,生成杨辉三角的前 numRows 行。 杨辉三角中,每个数是它左上方和右上方的数的和。 代码: dlt = [] for i in range(1,6): b = 0 lt = [] lt.append(1) if i 2: 第三层 for j in range(i 阅读全文
摘要:
词频:单词出现的次数 f = open(r'D:\python\z','r',encoding='utf8') data = f.read().lower() data_split = data.split(' ') count_dict = {} for word in data_split: i 阅读全文