Created
June 24, 2018 22:43
-
-
Save renzon/fc997e9ffe0697bfc53fbe3e5b13eb8e to your computer and use it in GitHub Desktop.
Conc lines in file accordingly to condition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open('seu_arquivo.txt', 'r', encoding='utf-8') as file: | |
new_line=[] | |
for line in file: | |
new_line.append(line) | |
if not # Aqui vai sua condiçao para concatenar com a(s) outra(s) linha(s): | |
print(''.join(new_line)) | |
new_line=[] | |
if new_line: | |
print(''.join(new_line)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment