nugrid_set.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:NuGridPy 作者: NuGrid 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号