Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

python help

Name: lol 2009-02-27 0:32

data = inFile.readlines()

when i do that it returns the lines as strings including the "\n"
i however need those to gtfo, how do i do this?

Name: Anonymous 2009-02-27 2:09

data = [i.rstrip() for i in inFile.readlines()]

if you were using a real language, you could just do this:
@data = grep{chomp}<INFILE>;

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List