Phython Syhntaq

  1. refseq_d = {}
  2. for line in refseq[1:]:
  3.         a = line.strip().split(‘,’)
  4.         ref_id = a[0].strip(‘”‘).split(‘.’)[0]
  5.         try:
  6.                 b = refseq_d[ref_id]
  7.                 refseq_d[ref_id] = b.append(a)
  8.         except KeyError:
  9.                 refseq_d[ref_id] = [a]
====================================================
refseq_d = {}

for line in refseq[1:]:
a = line.strip().split(‘,’)
ref_id = a[0].strip(‘”‘).split(‘.’)[0]
try:
b = refseq_d[ref_id]
refseq_d[ref_id] = b.append(a)
except KeyError:
refseq_d[ref_id] = [a]

====================================================

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s