Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def searchNucleotidi(subs):
- #@param subs: string; stringa di nucleotidi da cercare
- path = pickAFile()
- if path[len(path)-4:] != '.txt':
- return None
- res = ''
- file = open(path,'rt')
- s = file.read()
- pos = s.find(subs)
- if pos != -1:
- res+='Found in '
- else:
- res+='Not found'
- return res
- maggiore = s.rfind('>',0,pos)+1
- a_capo = s.find('\n',maggiore)
- res+=s[maggiore:a_capo]
- file.close()
- return res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement