Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #start counting at 1
  2. i = 1
  3. #open file as f
  4. f = open('c:\\users\\user\\documents\\rosalind\\rosalind_ini5.txt')
  5. #read lines in the file w/readlines()
  6. #if a line is even, print that line
  7. for line in f.readlines():
  8. if i % 2 == 0 :
  9. print line
  10. #repeat for the rest of the line and add them to the text in the file
  11. i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement