I knew list comprehension but I am having a hard time to understand how and why the list comprehension works below and I did not find similar post. Could someone please break it down and explain a bit more about it?
test_list1 = [1, 4, 5, 6, 5]
test_list2 = [3, 5, 7, 2, 5]
# using list comprehension to concatenate 2 lists
res_list = [y for x in [test_list1, test_list2] for y in x]
Thank you.