I'm a Python noob and I need some help for a simple problem.
What I need to do is create a list with 3 items and add spaces before and after every item.
For example: l1 = ['a', 'bb', 'c']
should be transformed into: [' a ',' bb ',' c ']
I was trying to write something like this:
lst = ['a', 'bb', 'c']
for a in lst:
print ' a '
...and so on for the other elements, but I get a syntax error. Can anyone suggest me a working way to do this? Thanks.