I have a text file sample.txt(space delimited) in this format
12 john E 44 L
13 adam D 78 L
14 tue E 98 L
I want to to convert this file into a nested list
table_data = [
[12, 'john', 'E', 44, 'L'],
[13, 'adam', 'D', 78, 'L'],
[14, 'tue', 'E', 98, 'L'],
]
How can i do it ?