May-02-2018, 12:57 PM
Hello All,
I am new to phython, so need your help.
My requirement is as below:
I will be getting inputs from stdin. The first line of input contains 2 space separated integers;N - the number of lines in the game and M - the number of characters in the lines.N lines follows. The ith of these lines contains a binary string of length M.
Constraints
1 <= N <=20
1<= M <= 20
Result :
Input
3 3
111
010
001
I want to arrange it in a list as ['111','010','001'] and then it should be sorted and result should be ['001','010','111'].
Please help.
I am new to phython, so need your help.
My requirement is as below:
I will be getting inputs from stdin. The first line of input contains 2 space separated integers;N - the number of lines in the game and M - the number of characters in the lines.N lines follows. The ith of these lines contains a binary string of length M.
Constraints
1 <= N <=20
1<= M <= 20
Result :
Input
3 3
111
010
001
I want to arrange it in a list as ['111','010','001'] and then it should be sorted and result should be ['001','010','111'].
Please help.