Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from urllib.request import urlopen
- id = "P42212"
- data = urlopen("http://www.uniprot.org/uniprot/" + id + ".txt").read().decode()
- result = data.split('SQ ')[-1] #here all the info you need
- mw = int(result.split(';')[1].strip().split()[0]) #extract the molecular weigth
- print(mw)
Add Comment
Please, Sign In to add comment