请问代码的问题出在哪里?
L = ['Adam', 'Lisa', 'Bart', 'Paul'] List0 = zip(range(1, len(L) + 1), L) for t in List0: print index, '-', name
输出的结果是:
3 - Paul 3 - Paul 3 - Paul 3 - Paul
还请各位高手不吝赐教
L = ['Adam', 'Lisa', 'Bart', 'Paul'] List0 = zip(range(1, len(L) + 1), L) for t in List0: print index, '-', name
输出的结果是:
3 - Paul 3 - Paul 3 - Paul 3 - Paul
还请各位高手不吝赐教
2018-06-28
举报