@@ -342,20 +342,20 @@ Example with an immutable type:
342342 In [15]: b
343343 Out[15]: 5 # b is not.
344344
345- Example with an immutable type:
345+ Example with a mutable type:
346346
347347.. code-block :: ipython
348348
349- In [16]: a = [1, 2, 3] # a is a mutable list
349+ In [16]: a = [1, 2, 3] # a is a mutable list
350350
351- In [17]: b = a # b is now another name for the same list
351+ In [17]: b = a # b is now another name for the same list
352352
353- In [18]: a += [4, 5, 6] # in-place add more to a
353+ In [18]: a += [4, 5, 6] # in-place add more to a
354354
355- In [19]: b
356- Out[19]: [1, 2, 3, 4, 5, 6]
355+ In [19]: b
356+ Out[19]: [1, 2, 3, 4, 5, 6]
357357
358- In [20]: # b is changed --it's the SAME list.
358+ In [20]: # b is changed --it's the SAME list.
359359
360360
361361 Multiple Assignment
@@ -765,7 +765,7 @@ Functions allow you to take code that would otherwise be duplicated potentially
765765
766766This is often referred to as "DRY" -- "Don't Repeat Yourself".
767767
768- It also helps to keep the code clean and maintainable, as there is only one place to make a change. This in trun helps reduce defects.
768+ It also helps to keep the code clean and maintainable, as there is only one place to make a change. This in turn helps reduce defects.
769769
770770Functions can take and return information.
771771
0 commit comments