import itertoolsfor x in map(''.join, itertools.product('01', repeat=4)): print x
Standard input is empty
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!