I want to use a list comprehension to achieve the same results as below. Can anyone help?
s1 = "one two three four"
s2 = "five six seven eight"
my_list = []
l1 = s1.split()
l2 = s2.split()
my_list.append(l1)
my_list.append(l2)
print(my_list)
It outputs:
[['one', 'two', 'three', 'four'], ['five', 'six', 'seven', 'eight']]