Scott a écrit :
(snip)
> print ' ' * left_margin + '| ' + ' ' sentence + ' |'
^
a '+' is missing here
(snip)
> Now if i put * before sentence as it is with the rest of the variables, it
> actually gets to the point where it asks me for the sentence, but after
> inputting my sentence I receive:
> Traceback (most recent call last):
> File "D:/Programming/Python/sequence string multiplication example", line
> 16, in <module>
> print ' ' * left_margin + '| ' + ' ' * sentence + ' |'
> TypeError: can't multiply sequence by non-int of type 'str'
Of course. You can't multiply a string by another string.
--
http://mail.python.org/mailman/listinfo/python-list