[Solved] Why does my \n not work and how can i make it work


if you just want to print out text instead of list then use str.join

# ...
print(''.join(b))

# or like this:
text="".join([(c + "  |  " + x + "\n") for _ in range(5)])
print(text)

# or python 3.6 style
text="".join(f"{c}  |  {x}\n" for _ in range(5))

2

solved Why does my \n not work and how can i make it work