Skip to content

Commit 1ed9a52

Browse files
authored
Merge pull request #2087 from abhi887/patch-1
scala-for-python-devs.md creating multiline string variable
2 parents 5f73420 + ce031b5 commit 1ed9a52

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

_overviews/scala3-book/scala-for-python-devs.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,19 @@ These examples demonstrate how to create variables in Python and Scala.
136136
<tr>
137137
<td class="python-block">
138138
<code>x = 1
139-
<br>x = "Hi"</code>
139+
<br>x = "Hi"
140+
<br>y = """foo
141+
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bar
142+
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; baz"""</code>
140143
</td>
141144
</tr>
142145
<tr>
143146
<td class="scala-block">
144147
<code>val x = 1
145-
<br>val x = "Hi"</code>
148+
<br>val x = "Hi"
149+
<br>val y = """foo
150+
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bar
151+
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; baz"""</code>
146152
</td>
147153
</tr>
148154
</tbody>
@@ -180,7 +186,7 @@ These examples demonstrate how to create variables in Python and Scala.
180186
</tr>
181187
<tr>
182188
<td class="scala-block">
183-
<code>val movies = Map(
189+
<code>val x = Map(
184190
<br>&nbsp; "Toy Story" -&gt; 8.3,
185191
<br>&nbsp; "Forrest Gump" -&gt; 8.8,
186192
<br>&nbsp; "Cloud Atlas" -&gt; 7.4

0 commit comments

Comments
 (0)