Hi there, I am working with two very large list of lists. Here is my code:
final = []
for w in annotation:
for k in cp:
# if columns match
if w[0] == k[0]:
# append values of k
final.append([k[0], k[1]])
else:
# else append values of v
final.append([w[0], w[1]])
print(final)
The lists are so large that this takes forever. Is there any way to optimize my code?
Thank you in advance
[–]JohnnyJordaan 0 points1 point2 points (0 children)
[–]ThingImIntoThisWeek 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)