I want to output the following string n times.
" add x0,x0,x0 # placefold \n\t" \
When I use
placeholder=r'" add x0,x0,x0 # placefold \n\t" \'
print(placeholder)
EOL while scanning string literal
error occurred. I clearly added r
in front of the string, why does this error still occur.
When i use
placeholder=r'" add x0,x0,x0 # placefold \n\t" \ '
print(placeholder)
(I added a space before the'
.)
There is no error after running. But I don’t want an extra space at the end.
what should I do? What I want to achieve is:
placeholder=(r'" add x0,x0,x0 # placefold \n\t" \' +"\n")*repeat_number
print(placeholder)
Thanks!