Alist=['A_rig','B_obj','F_rig','H_obj','T_rig',]B=[]for each in Alist:if 'obj' in each:B.append(each)print(B)
List2=[i for i in list if i.endswith(“.obj”)]