Dear Python hackers, I have text file. I read each line and store it in List.
my requirement is I need to check only 6 special lines from i.e 1. resultToPDFFile 2. resultToPDFFileDialog 3. resultToQdasFile 4. resultToQdasFileDialog 5. resultToTableFile 6. resultToTableFileDialog Note: each line have value set in the end eg: "resultToPDFFile '->' true" my conditions are: if first line mentioned above found check the value if it "true" set dictionary item D['PDF'] = "ON" else if value is not "true" then check for line resultToPDFFileDialog if value is "off" set dictionary item D['PDF'] = "OFF" else: set dictionary item D['PDF'] = "ASK" for example these are the lines in file: resultToPDFFile '->' 'true' resultToPDFFileDialog '->' 'on' >> I have put if else condition statements exactly same as I mentioned above. >> now my problem is though the resultToPDFFile is "true" >> first time I get the value as ON for dictionary item D['PDF'] >> When loop starts for finding other lines i.e numbers 3 & 4 from above list my Dictionary item D['PDF'] is becoming "ASK" >> the loop is entering into last else part. >> what is problem I am not gotting >> is my if else structure is wrong or not I am totally not getting other idea please help >> thank you in advance. -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidha...@gmail.com +919449073835 _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers