list1.append(list2) returns None

Pyenos pyenos at pyenos.org
Thu Dec 21 03:16:37 EST 2006


i rewrote the code following the advices from subdir of the parent thread:

# well, table is composed of a list of columns.
# so let's stick them together
def enlargetable(table,col):
    table.append(col) # the code won't return sorted lists :-o
    return_the_fucking_table_bitch=table # assign it to a new variable to return it
    return return_the_fucking_table_bitch # :-|
    

def removecolfromtable(table,col):
    return table.remove(col)

print enlargetable([[1],[2],[3]],[4])

# and this code works.



More information about the Python-list mailing list