I am trying to get values from an input file,

     0.192
     Custom
     15
     IN

but, when I check to see if they are equal it is not true.

     f = open(infile, 'r')
     s = f.readlines()
     f.close()

     Block = str(s[1])
     Angle = float(s[2])
     Position = str(s[3])
     if Block == 'Custom':
           print 'equal'

if I print Block+'Custom', I get,

     Custom
     Custom

when I would have expected

     CustomCustom

Can someone help me figure out if  I am not reading the values in correctly,
is there a control character at the end?  The float value is ok.

-- 
"The game of science can accurately be described as a never-ending insult to
human intelligence." - João Magueijo
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to