diff --git a/_episodes/03-lists.md b/_episodes/03-lists.md index ca9dc9af2..1d23bc20d 100644 --- a/_episodes/03-lists.md +++ b/_episodes/03-lists.md @@ -111,19 +111,17 @@ does not. > > Data which can be modified in place is called [mutable]({{ page.root }}/reference/#mutable), > while data which cannot be modified is called [immutable]({{ page.root }}/reference/#immutable). -> Strings and numbers are immutable. -> This does not mean that variables with string or number values are constants, -> but when we want to change the value of a string or number variable, we can only +> Strings and numbers are immutable. This does not mean that variables with string or number values +> are constants, but when we want to change the value of a string or number variable, we can only > replace the old value with a completely new value. > -> Lists and arrays, on the other hand, are mutable: we can modify them after they have been created. -> We can change individual elements, append new elements, or reorder the whole list. -> For some operations, like sorting, we can choose whether to use a function that modifies the data +> Lists and arrays, on the other hand, are mutable: we can modify them after they have been +> created. We can change individual elements, append new elements, or reorder the whole list. For +> some operations, like sorting, we can choose whether to use a function that modifies the data > in-place or a function that returns a modified copy and leaves the original unchanged. > -> Be careful when modifying data in-place. -> If two variables refer to the same list, and you modify the list value, -> it will change for both variables! +> Be careful when modifying data in-place. If two variables refer to the same list, and you modify +> the list value, it will change for both variables! > > ~~~ > salsa = ['peppers', 'onions', 'cilantro', 'tomatoes'] @@ -174,9 +172,8 @@ does not. > > Here is a visual example of how indexing a list of lists `x` works: > -> -> ![The first element of a list. Adapted from @hadleywickham.](../fig/indexing_lists_python.png) -> +> [![The first element of a list. +> Adapted from @hadleywickham.](../fig/indexing_lists_python.png)][hadleywickham-tweet] > > Using the previously declared list `x`, these would be the results of the > index operations shown in the image: @@ -211,7 +208,7 @@ does not. > ~~~ > {: .output} > -> Thanks to [Hadley Wickham](https://twitter.com/hadleywickham/status/643381054758363136) +> Thanks to [Hadley Wickham][hadleywickham-tweet] > for the image above. {: .callout} @@ -542,4 +539,6 @@ Omitting ending index: ["sep", "oct", "nov", "dec"] > {: .solution} {: .challenge} +[hadleywickham-tweet]: https://twitter.com/hadleywickham/status/643381054758363136 + {% include links.md %}