a = [0, 1, 2, 3, 4]
code:
b = [ i+1 for i in a)]
output:
b = [1, 2, 3, 4, 5]
a = [0, 1, 2, 3, 4]
code:
b = [ i+1 for i in a)]
output:
b = [1, 2, 3, 4, 5]
Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:
部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。