char = '2'print '2'*['0', 'a', 'b', 'c', '2'].index(char)
Standard input is empty
2222
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!