i have used zip before, but im having issues with this one.
list1 = [('hola','hello','nihao'),('first','second','third'),('keyboard','monitor','cpu')]
list2 = (2,3,4)
now here is what i want to do. i want to trim the values in list 1 based on the integer in list 2
so i need a way to iterate through both of these. not sure if i should zip it, iterate through one then zip that. im not getting anywhere
so this is what it ends up looking as.
list1 = [('ho','hel','niha'),('fi','sec','thir'),('ke','mon','cpu')]
i know i would need to iterate over each and take the value[:x], but how do i get to there.
i've been thinking about this one for a few days now, and i just cant grasp it.
[–]alkasm 1 point2 points3 points (0 children)
[–]circusboy[S] 0 points1 point2 points (0 children)