I have a list:
mylist = ['summer_C','summer_C1','summer_P','summer_C123','summer_p32']
I want to print all items which do not end with the following pattern:
'_C' or '_C%' (int)
so it could be something like '_C' or '_C1' or '_C2939'
My attempt:
for item in mylist:
if item[-2:] != '_C' or item[-x:] != '_C(INT)'
print item
As you can see its not very dynamic, how can I approach this?