def get_stable(specie_list,get_elements=True):
'''
Input isotope list or element list, get stable list back
if get_elements=True return elements of all stables in isotope_list
'''
stable_list=[]
for specie in specie_list:
if is_stable(specie) == 't':
if get_elements==True and len(specie.split("-"))==2:
if specie.split("-")[0] not in stable_list:
stable_list.append(specie.split("-")[0])
else:
stable_list.append(specie)
return stable_list
评论列表
文章目录