Skip to content

Instantly share code, notes, and snippets.

@tahwaru
tahwaru / 01_read.py
Created February 27, 2021 11:54 — forked from cjue25/01_read.py
Using Python for Research_Case Study 1 &2
def read_seq(inputfile):
"""reads and returns the imput sequence with special characters removed."""
with open(inputfile, 'r') as f:
seq=f.read()
seq = seq.replace("\n","")
seq= seq.replace("\r","")
return seq