Questão. A seguir está uma transcrição de uma seção do Python Shell. Suponha ainda que fizemos as seguintes atribuições:
In [1]: x = [1, False, True, "acer", None, 3.14, "tei!"]In [2]: y = [-1, False, [True, "er", None], 3.14, "rei"]
Complete as lacunas com o tipo e o valor do resultado da expressão correspondente. Se ocorrer um erro, escreva apenas ERRO.
In [3]: len([]) tipo: int valor: 0
In [4]: len(x) tipo: int valor: 7
In [5]: len( y) tipo: int valor: 5
In [6]: [11, 22] + [33, 44] tipo: list valor: [11, 22, 33, 44]
In [7]: [11] + 10 tipo: ERRO valor: ERRO
In [8]: 3 * [55] tipo: list valor: [55, 55, 55]
In [9]: [66, 77] * 2 tipo: list valor: [66, 77, 66, 77]
In [10]: x[1] tipo: bool valor: False
In [11]: x[4] tipo: NoneType valor: None
In [12]: x[3] + x[6] tipo: str valor: 'acertei!'
In [13]: y[0] tipo: int valor: -1
In [14]: y[2] tipo: list valor: [True, "er", None]
In [15]: y[2][1] tipo: str valor: 'er'
In [16]: y[5] tipo: ERRO valor: ERRO
In [17]: x[7] tipo: ERRO valor: ERRO

Comentários?