0
Please help me understanding the end=‘ ‘ argument
colors = ['red', 'yellow', 'orange'] for color in colors: if color != 'yellow': print(color, end='-') Why is the answer for this code: red-orange- and not: red-orange Isn’t the last end =‘-‘ (the right side of orange) only called when another value is added.
2 Respostas
+ 3
Jenkins
The end parameter is used to append any string at the end of the output of the print statement in python.
https://www.studytonight.com/post/the-sep-and-end-parameters-in-python-print-statement
+ 1
The end parameter is used to append a string to the output of print() when printing of one statement is done.