I have a list of strings with the same pattern and I want to extract the middle of those strings
my_list=["This is my first string","This is my second string"]
my_list2=[string[5:] for string in my_list]
my_list2=[string[:-7] for string in my_list]
Output: ["is my first","is my second"]
My solution is working but How can I simplify the two list comprehensions into one line of code ?