doubt loading pages

José Manuel Suárez Sierra josemsuarezsierra at gmail.com
Wed Feb 1 05:54:46 EST 2017


hello everyone,
Im trying to make a program that takes an archive from pdb (for instance this link http://www.rcsb.org/pdb/files/fasta.txt?structureIdList=5HXY

after reading it I want it to save in a list only this part of the archive:

MGSSHHHHHHSSGLVPRGSHMASMTGGQQMGRGSMPAETNEYLSRFVEYMTGERKSRYTIKEYRFLVDQFLSFMNKKPDEITPMDIERYKNFLAVKKRYSKTSQYLAIKAVKLFYKALDLRVPINLTPPKRPSHMPVYLSEDEAKRLIEAASSDTRMYAIVSVLAYTGVRVGELCNLKISDVDLQESIINVRSGKGDKDRIVIMAEECVKALGSYLDLRLSMDTDNDYLFVSNRRVRFDTSTIERMIRDLGKKAGIQKKVTPHVLRHTFATSVLRNGGDIRFIQQILGHASVATTQIYTHLNDSALREMYTQHRPRY

I have written this:

import urllib2


seq=raw_input("Introduce pdb code \n")



seq = urllib2.urlopen("http://www.rcsb.org/pdb/files/fasta.txt?structureIdList="+seq)
print seq.read()


seq.close()


My question is, how do I save this into a python list?

Thank you!



More information about the Python-list mailing list