remove newline from file in python,"str2 = str.replace('\n', '')"