Transferência adequada de linha para Python
📁 lista, python, exemplo
Diga-me, há uma lista com frases, mas elas são longas e o pep8 reclama sobre o comprimento da linha.
Eu transfiro parte da frase com o símbolo \ , mas então ele conta todos os espaços.
Exemplo:
list_of_words = [ "" "The weather is good." "" , "" "Hot dog is the best food, \ it would be a sure sign that it was still yummy." "" , "" "The girls are beautiful." "" , "" "Anyone doesn’t matter, but after backslashes a huge \ distance between words. How to fix it?" "" ] print (*list_of_words) A saída:
The weather is good. Hot dog is the best food, it will be a sure sign that it was still yummy. T