Love maybe lines: solve this exercise using list comprehensions?

Is there a way to solve this exercise using list comprehensions? And if so, how?

Essentially, write the loop inside list brackets…

b = [x.strip() for x in a]
6 Likes