Oct-12-2021, 01:00 PM
Another simple approach is to use sep and end as arguments in your print statement
first = 1 second = 3 third = 2 print("The input numbers are ",end="") print(first, second, third, sep=", ")
Output:The input numbers are 1, 3, 2
which also works in pre-f string versions of Python