0

I want to print the following variables on the same line:

print('pre_date', pre_date, 'date', date)

Execute the script in GUI and the output is:

pre_date
2021.01.06T00:00:00.000000000
date
2021.01.06T00:00:00.000000000

The result is displayed on 4 separate lines. How to output them on the same line?

damie
  • 412
  • 2
  • 7

1 Answers1

0

You can use the plus sign (“+”) to concatenate strings together and print it out:

print('pre_date:' + string(pre_date) + ',date:' + string(date))
dontyousee
  • 458
  • 2
  • 9