Jan-27-2022, 05:59 PM
To say i tripled check and more to see if there was mistyping.
Its not this code it is the one provided by menator:
When actually it is just a way to create a space between the porfolio stocks and prices in the output.
Sometimes i can be dense!
Thanks dean
Its not this code it is the one provided by menator:
str_len = len(max(p)[0]) for (ticker, shares) in p: if len(ticker) < str_len: spacer = ' '*(str_len - len(ticker) + 2) else: spacer = ' '*2 print(f'{ticker} {spacer} {shares}')str is for string and len is for length (maximum(p)) Whatever i thought it was his solution to solve the mystery behind the absence of output and error returned.
When actually it is just a way to create a space between the porfolio stocks and prices in the output.
Sometimes i can be dense!
Thanks dean