Question

# This is the question that i am doing for practice, i have taken a crack at it but i cant seem to get any further

than i am. could you show me how to finish it ?

this is what i have done

with open("dic_db_scientists.txt") as f:

data=f.readlines()

for i in range(0,len(data)):

data[i]=data[i].strip('n')

d={}

for i in range(0,len(data)):

if(data[i]!=''):

if(data[i].split()[0]=='scientist'):

temp={}

for j in range(1,7):

if(data[i+j]!=''):

if(data[i+j].split()[0]!='author'):

s1=""

for k in range(1,len(data[i+j].split())):

s1=s1+data[i+j].split()[k]+" "

temp[data[i+j].split()[0]] = s1

else:

temp[data[i+j].split()[0]] = data[i+j].strip('author ').split(', ')

d[data[i].split()[1]]=temp

this is the problem :

### Recently Asked Questions

- Python Program that can do the following: Compute their Cartesian product, AxB of two lists . Each list has no more than 10 numbers. For example, given the two

- Hello, this class focusses on the program Anaconda, which is similar to Python programming. I would appreciate it if you could help me answer this problem.

- how can i make a program that calculate a tax rate for 2 country , user input the choice either country 1 or 2 then user input the salary income and the