Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #start counting at 1
- i = 1
- #open file as f
- f = open('c:\\users\\user\\documents\\rosalind\\rosalind_ini5.txt')
- #read lines in the file w/readlines()
- #if a line is even, print that line
- for line in f.readlines():
- if i % 2 == 0 :
- print line
- #repeat for the rest of the line and add them to the text in the file
- i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement