Python – Use multiple str.startswith() in a for loop get their specific values
Python – Use multiple str.startswith() in a for loop get their specific values Question: The below function parses multiple csv files in a directory and takes out values using str.startwith(). It works find using ‘firstline.startswith(‘TrakPro’)‘ and ‘txt.startswith(‘Serial’)‘. However, when I add a third str.startwith() i.e. txt2.startswith(‘Test’), nothing prints out, no error, appears to ignore it. …