I'm running into a problem which I cannot solve online- all answers I've found only allow the appending to happen once since it just keeps repeating the same action.
For context: If a string isn't 128 lines long- I want to pad it out to reach 128. All padding should add 00 then move to the next line. For example:
01
01
02
03
05
06
09
01
Then with padding should become
01
01
02
03
05
06
09
01
00
00
00
00 UP TO 128 lines
Hope that explains what I need to do.
I've tried using .join and .ljust/.rjust. inside a while loop. The while loop is:
while count != 129:
padding.join("00\n")
count += 1
However it only ever prints out 00. Any advice is appreciated. Thank you!
padding.join("00\n"), exactly what do you expect this to do, and why? What does the namepaddingmean in your program? What do you expect should be contained inpaddingafter the loop, and how would this help you solve the problem? What is contained inpaddingafter the loop? Please read ericlippert.com/2014/03/05/how-to-debug-small-programs.?).