On Thu, 21 Dec 2006 16:29:01 +1100, Ben Finney wrote: > Pyenos <[EMAIL PROTECTED]> writes: > >> def enlargetable(table,col): >> return table.append(col) >> >> def removecolfromtable(table,col): >> return table.remove(col) >> >> print enlargetable([[1],[2],[3]],[4]) # returns None >> >> Why does it return None instead of [[1],[2],[3],[4]] which I expected? > > The answer is both "because that's what it's documented to do":
Documentation is a funny thing... help([].append) Help on built-in function append: append(...) L.append(object) -- append object to end Sometimes it is hard to tell when you've read enough documentation. However, as a general rule, "None whatsoever" is rarely enough. -- Steven -- http://mail.python.org/mailman/listinfo/python-list