I need a string consisting of a repetition of a particular character. At the Python console, if I type:
n = '0'*8
then n
gets assigned a string consisting of 8 zeroes, which is what I expect.
But, if I have the same in a Python program (.py
file), then the program aborts with an error saying
can't multiply sequence by non-int of type 'str'
Any way to fix this?