I have a nested list which contains lists filled with strings. What I am trying to do is make each list in this nest the same length as the longest available list in that n
The problem is with the line:
if row < len(maxSS7):
You're comparing the list row
with the integer len(maxSS7)
. It will evaluate to False
each time. Change it to:
maxLen = max(map(len, myList))
for row in myList:
if len(row) < maxLen:
row.extend(...)
Martijn Peters pointed another problem with your code in his answer.