L=[123, 'spam', 1.23];
print(L);
print(len(L));
print(L[0]);
print(L[:-1]);
print(L+[4,5,6]);
print(L);
L=L+[6];
print(L);
L.append('NI');
print(L);
L.pop(2);
print(L);
L=['bb', 'aa', 'cc'];
L.sort();
print(L);
L.reverse();
print(L);
M=[[1,2,3],[4,5,6],[7,8,9]];
print(M);
print(M[1]);
print(M[1][2]);
#M[1]=L;
print(M);
col=[row[1] for row in M];
print(col);
col=[row[1]+1 for row in M];
print(col);
col=[row[1] for row in M if row[1]%2==0];
print(col);
diag=[M[i][i] for i in [0, 1, 2]];
print(diag);
doubles=(c*2 for c in 'spam');
print(doubles);
G=(sum(row) for row in M);
print(next(G));
print(next(G));
print(list(map(sum, M)));
print({sum(row) for row in M});
print({i:sum(M[i]) for i in range(3)});
print([ord(x) for x in 'spam']);
print({ord(x) for x in 'spam'});
print({x:ord(x) for x in 'spam'})
