dat = '857142' * 2pos = [0,2,1,4,5,3]for p in pos: print(dat[p:p+6])
Standard input is empty
857142 714285 571428 428571 285714 142857
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!