python - How to directly assign specified elements when debugging code in Pycharm for list traversal
淡淡烟草味
淡淡烟草味 2017-07-05 10:34:14
0
1
1282

Use Pycharm IDE to debug python code. The code error occurs when running to the last element of a list, so I want to directly debug the last element of the list to see where there is a problem.

Use for...in...loop to traverse in a list: [1,3,5,7,9]

list = [1, 3, 5, 7, 9]
for each_item in list:
    print(each_item)

Can we directly skip the previous each_item and directly assign it to 9 when running to the first line of the loop body?
How to operate? Thanks!

淡淡烟草味
淡淡烟草味

reply all(1)
学霸

list = [9]

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template