I am trying to iterate through a list of float widths that varies.
[10.5, 15.5, 3.7] <- Randomly generated
I am using this list of floats to generate spaces between a list of strings I am trying to print. I am doing this via
print ''.join('%*s' %i for i in zip(WIDTHS, LIST_OF_STRINGS))
I am getting the error
TypeError: sequence expected, generator found
Can anyone explain why I am getting this error?
EDIT: Python Version 2.4
I have modified your code in several ways. Now it works here (Python 2.7):
results in
The width value in a format string is not a float, but two ints, separated by a
..