Avatar ·

Transferencia adecuada de la línea a Python

📁 lista, python, ejemplo

Dime, hay una lista con frases, pero son largas y pep8 se queja por la longitud de la línea.

Transfiero la parte de la frase con el símbolo \, pero luego cuenta todos los espacios.

Ejemplo:

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)

La salida:

The weather is good. Hot dog is the best food, it will be a sure sign that it was still yummy. T