Search code examples
pythonlistopencsv

Issue while reading data list considers as next item if data has comma inside


I am reading a csv file using csv reader. and then using for loop I iterate and get the records in list . Now as my data has comma (amount values-0,00),its Dutch format, Now during the read after as there is comma in string , it considers it as another string. How to include all the data in single string?

example- data am reading

21RE-R01ER3100000*
21RE-R01SR5100000*
21RE-R01IT5100155 XX.XX.XX.XXXXXBankspaar Hypotheek                                        0,00-              8.500,00                                                     *
21RE-R01IT5100155 XX.XX.XX.XXXXX8Bankspaar Hypotheek                                        0,00-              8.500,00    
Till * is the and of line  
CODE-
                                               *

Solution

  • str_array.extend(row) solved the issue