@aeaechan96 wrote:
0
I need to be able to slice a list of points into multiple sublists, to act as a guide for slicing another list.
My list right now is y_vals = [a,a,a,a,a,a,b,b,b,b,b,b,b,b,b,b,b,c,c,c,c,c…] and I need it to slice every time the number changes. a, b and c are actual numbers, but the numbers are rather long, so I typed it out in a,b,c.
I wanted to use the slicing method of [:x], but it’s a list of 5000 over numbers, and I’m not sure how to slice a list. Thank you in advance!
Posts: 8
Participants: 4