Issue #3 new

Wrong result shown in "Listing 2-10. Modifying a List"

Anonymous created an issue

(nothing worse than a teaching book that gives wrong examples) Example for assigning to an empty slice shows wrong result:

one = ['a', 'b', 'c', 'd'] two = ['e', 'f'] one[2:2] = two one BOOK SHOWS RESULT AS ['a', 'b', 'c', 'd', 'e', 'f'] CORRECT RESULT IS ['a', 'b', 'e', 'f', 'c', 'd']

Comments (0)

  1. Log in to comment