public
Description: repository for the code featured in the blog
Homepage: http://python.genedrift.org
Clone URL: git://github.com/nuin/beginning-python-for-bioinformatics.git
Search Repo:
100755 14 lines (11 sloc) 0.264 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /usr/bin/env python
 
'''
reading a sequence file and printing first and last lines
'''
 
dnafile = "AY162388.seq"
file = open(dnafile, 'r').readlines()
print 'I want the first line'
print file[0]
print 'now the last line'
#print file[len(file)-1]
print file[-1]