Difference between revisions of "Code Snippet: Long Strings"

From Coder Merlin
Line 1: Line 1:
== Long String Literals  ==
= Long String Literals  =
 
== Swift ==
<syntaxhighlight lang="swift">
<syntaxhighlight lang="swift">
let longString = """
let longString = """
Line 10: Line 12:
print(longString)
print(longString)
</syntaxhighlight>
</syntaxhighlight>
== Python ==

Revision as of 17:24, 24 December 2018

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Long String Literals[edit]

Swift[edit]

let longString = """
We the People of the United States, in Order to form a more perfect Union, establish Justice,
insure domestic Tranquility, provide for the common defence, promote the general Welfare, and
secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this
Constitution for the United States of America.
"""

print(longString)

Python[edit]