How to print a linebreak in a python function?

Geparada picture Geparada · May 12, 2011 · Viewed 709.4k times · Source

I have a list of strings in my code;

A = ['a1', 'a2', 'a3' ...]
B = ['b1', 'b2', 'b3' ...]

and I want to print them separated by a linebreak, like this:

>a1
b1
>a2
b2
>a3
b3

I've tried:

print '>' + A + '/n' + B

But /n isn't recognized like a line break.

Answer

Winston Ewert picture Winston Ewert · May 12, 2011

You have your slash backwards, it should be "\n"