Posts by Jane • 1 point
1 post
-
0
votes1
answer380
viewsQ: traverse python int lists by skipping consecutive numbers
Guys, I’m trying to eliminate consecutive numbers in a list of integers. When the list is for example 1,2,3,5,6,7,8,9... it show: 1-3, 5-9 I tried many ways and I arrived at that code: def…
python-3.xasked Jane 1