How to set diferent note_length?

Thanks to Neil, I have happy time using scamp to have fun with music. But I found another issue: All of the notes_lengths are set the same. If I prefer to change note_length for different notes, what should I do?
from scamp import *

s = Session()
s.tempo = 65

user input instrument and its information format dict

all_parts_info = [
[[45, 52, 59, 57, 60], [0.9, 0.6, 0.8, 0.5, 0.8], [0.5, 1, 0.5, 1, 0.5]],
# I change the note_length here But it does not work logically
[[49, 52, 59, 57, 62], [0.9, 0.6, 0.8, 0.5, 0.8], [0.5, 1, 0.5, 1, 0.5]]
]

instrument_names = [‘guitar’, ‘piano’]

instruments = []
for inst in instrument_names:
x = s.new_part(inst)
instruments.append(x)

print(‘instruments:’, instruments)

def my(instrument, part_info):
pitches = part_info[0]
volumes = part_info[1]
note_length = part_info[2]
iter_list = list(zip(pitches, volumes))
for p, v in iter_list:
instrument.play_note(p, v, note_length)

for instrument, this_part_info in zip(instruments, all_parts_info):
s.fork(my, (instrument, this_part_info))

s.wait_for_children_to_finish()

I made it myself, find the index of (p,v) , then note_length= note_length_list[index], it runs. problem solved

you need to iterate over the elements of note_length the same way you iterate over pitches and volumes. note: you don’t need to list the zip if you are just going to iterate it once.

zipped_info = zip(pitches, volumes, note_length)

for p, v l, in zipped_info:
    instrument.play_note(p, v, l)

Checkout these for more details:
https://docs.python.org/3/tutorial/controlflow.html#for-statements
https://docs.python.org/3/tutorial/classes.html#iterators
https://docs.python.org/3/library/functions.html?highlight=zip#zip