|
|
|
 |
Attention |
Topic was automatically imported from the old Question2Answer platform. |
 |
Asked By |
Nick888 |
I have the following line of code:
set_text(“Very well-Load Game unlocked-Patience:Human-Reflexes:Dog”)
How can syntax the set text message to appear on the screen as below?:
" Very well
Load Game unlocked
Patience:Human
Reflexes:Dog "
Thank you.
|
|
|
 |
Reply From: |
Dlean Jeans |
Use \n
for line break.
text = "Very well\nLoad Game unlocked\nPatience:Human\nReflexes:Dog"
Click here to run the code above.
Thank you very much!
Nick888 | 2019-07-02 05:41
You can also use a multi-line string which preserves line breaks:
text = """Very well
Load Game unlocked
Patience:Human
Reflexes:Dog"""
Note that the continuation lines must not be indented; otherwise, the indentation will be contained in the final string.
Calinou | 2019-07-02 11:33