I got a text file that is a single line of a string. For example:
I need to read the file using stdin then traverse each characters into multiple arrays where each row shifts to the left by one character:I’m John
It is important to note the length of the arrays and number of arrays I create are variable that are dependent on the length of the string from the text file (n*n). In this case it would be 8*8 characters, so I need to create 8 arrays with 8 length each. Any help please?row1 = [I, ‘ , m , , J , o , h , n]
row2 = [‘ , m , , J, o , h, n , I ]
row3 = [m , , J , o , h, n, I , ‘ ]
row4 = [, , J , o , h , n , I , ‘ , m]
...
rown = [n , I , ‘ , m , , J , o , h ]