From 7ab07a5abf5213b5221b14754913b193d4a1c665 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Sat, 16 May 2009 01:24:58 -0400 Subject: [PATCH] fixed error about list append() method [thanks G.P.] --- native-datatypes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native-datatypes.html b/native-datatypes.html index 3c81318..36d5da7 100644 --- a/native-datatypes.html +++ b/native-datatypes.html @@ -276,7 +276,7 @@ body{counter-reset:h1 2}
  1. The extend() method takes a single argument, which is always a list, and adds each of the items of that list to a_list.
  2. If you start with a list of three items and extend it with a list of another three items, you end up with a list of six items. -
  3. On the other hand, the append() method takes any number of arguments, each of which can be any datatype. Here, you’re calling the append() method with a single argument, a list of three items. +
  4. On the other hand, the append() method takes a single argument, which can be any datatype. Here, you’re calling the append() method with a list of three items.
  5. If you start with a list of six items and append a list onto it, you end up with... a list of seven items. Why seven? Because the last item (which you just appended) is itself a list. Lists can contain any type of data, including other lists. That may be what you want, or it may not. But it’s what you asked for, and it’s what you got.

Searching For Values In A List