typeerror 'builtin_function_or_method' objet n'a pas d'attribut '__getitem__'

Voici le code:

The_Start = [1,1]
The_End = [1, 1]
for z in range(20):
    for x in range(len(The_Start) - 1):
        y  = The_Start[x] + The_Start[x + 1]
        The_End.insert[x + 1, y]
    print The_End
    The_Start = The_End
    The_End = [1, 1]

Ce code est censé faire le triangle de Pascal. L'erreur est sur la sixième ligne.

InformationsquelleAutor Roman Davis | 2012-10-25