public this repo is viewable by everyone
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
100755 13 lines (9 sloc) 0.252 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /usr/bin/env python
 
'''simple script to open a file and print all lines'''
 
#assigning a filename to a variable
dnafile = "AY162388.seq"
 
#opening the file
file = open(dnafile, 'r')
 
#printing each line of the file
for line in file:
    print line,