b = {}b[1] = 0c = 0for k in b.keys(): if c < 10: b[c] = 1 c += 1print b
Standard input is empty
{0: 1, 1: 0}
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!