For example, I have a list ["lol", "sas", "kes", "al"] and I need to add "Hello" if the element in the list contains a letter "l" and "Goodbye" if element contains "s". I should get ["Hello lol", "Goodbye sas", "Goodbye kes", "Hello al"]. How can I achieve this? Do I need to use two if statements? I am a beginner, and I can add only one element to the list like this:
my_list = ["lol", "sas", "kes"]
new_list = ["Hello, " + x for x in my_list]
new_list