结果记录

ontology1 = ['molecular','pathogenesis','pathophysiology','physiological','genetic','epigenetic','tau']
ontology2 = ['diagnosis','assessment','disease','monitoring','diagnosing']
ontology3 = ['translational','clinical','interventions','therapies','preclinical','interventions']
ontology4 = ['epidemiology','epidemiological''longitudinal','cross-sectional']
#ontology5 = ['care','support','health','economics','caregiver','care-giving','socioeconomic']
ontology5 = ['care','support','caregiver','care-giving']
ontology6 = ['resources','infrastructure','centers']

list的复制问题
a=[1,2]
b=a

这种做法其实并未真正生成一个新的列表,b指向的仍然是a所指向的对象。这样,如果对a或b的元素进行修改,a,b的值同时发生变化。

解决的方法为:

 
a=[1,2]
b=a[:]

这样修改a对b没有影响。修改b对a没有影响。

ontology1= ['pathogenesis','pathophysiology', 'neuropathological', 'physiological','epigenetic', 'molecular pathogenesis']
ontology2 = ['diagnosis','assessment','monitoring','diagnosing', 'tool', 'tools']
ontology3 = ['translational','interventions','therapies','preclinical','interventions', 'trial', 'trials', 'drug', 'drugs', 'treatment', 'compound', 'compounds']
ontology4 = ['epidemiology','epidemiological','longitudinal','cross-sectional']
ontology5 = ['care','support','caregiver','care-giving']
ontology6 = ['resources','infrastructure','centers']

ontology1= ['pathogenesis','pathophysiology', neuropathological, 'physiological','epigenetic', 'molecular pathogenesis'] pathology, molecular basis
ontology2 = ['diagnosis' ,'monitoring','diagnosing', tool, tools], diagnose, monitor, cognitive assessment,
ontology3 = ['translational', ,'interventions','therapies','preclinical','interventions', trial, trials, drug, drugs, treatment, compound, compounds, ], clinical intervention, clinical interventions
ontology4 = ['epidemiology','epidemiological','longitudinal','cross-sectional'], risk factor, risk factors, prevalence, interview
ontology5 = [,'caregiver','care-giving'], assisted care,
ontology6 = ['resources','infrastructure','centers']

原文地址:https://www.cnblogs.com/lovely7/p/6104284.html