Montreal Python Workshop/Data types: Difference between revisions
Content added Content deleted
imported>Merwok (→Types) |
imported>Merwok |
||
Line 43: | Line 43: | ||
* Strings are bits of text, and contain characters like numbers, letters, whitespace, and punctuation. |
* Strings are bits of text, and contain characters like numbers, letters, whitespace, and punctuation. |
||
* String are surrounded by quotes. |
* String are surrounded by quotes (a pair of ' or a pair of "). |
||
* Use triple-quotes (""") to create whitespace-preserving multi-line strings. |
* Use triple-quotes (""") to create whitespace-preserving multi-line strings. |
||
<pre> |
<pre> |
||
>>> |
>>> 'Hello' |
||
'Hello' |
'Hello' |
||
</pre> |
</pre> |