I know you can't use \n in f string formats{} but I'm trying to figure out how to print a list separated by line.
Each printed number should have a width of 10
# Output
# 12
# 28
# 45
# 47
# 52
# 71
# 95
# 122
# 164
I'm not allowed to use any external modules such as itertools or functools to answer this question.
I've tried
num_list = [12, 16, 17, 2, 5, 19, 24, 27, 42]
new_list = num_list.copy()
for n in range(1, len(new_list)):
new_list[n] += new_list[n-1]
print(f'{*new_list:10f, sep = "\n"}')