'''
OP has 3 nested lists. OP wants to print each row of the list unto a line with
a space in between each line item.
'''
sample_list = [['H', 'J', 'K', 'L'], ['Q', 'W', 'E', 'R'], ['R', 'W', 'Q', 'T']]
import numpy as np
sample_array = np.array(sample_list)
print(sample_array.reshape(4, 3))
Here is the output:
[['H' 'J' 'K']
['L' 'Q' 'W']
['E' 'R' 'R']
['W' 'Q' 'T']]
As a beginner, it may be useful to learn about numpy. It simplifies tasks such as this when you are working with data in lists. What I did here is I created a numpy array from the nested list that you showed. numpy has a method called. reshape() that allows you to align the amount of rows and columns that you want for the data. In your example you wanted 4 rows and 3 columns for the letter, so passing 4, 3 to the .reshape() function will allow you to get 4 rows and 3 columns for the data. As a beginner, there are libraries in Python such as numpy that can help you simplify tasks such as this. I hope that this answer helps as you learn more.