(Mar-12-2017, 05:22 PM)SandraDan Wrote: @wavic I don't understand this version of the code. I would have to learn more about Python to be able to grasp this. But thank you very much for your advice.This is called string formatting. {} is where the positional arguments in the string format() method is replaced with.
Here is a simple example:
a = 'one' b = 'two' c = 'three' print("Count to 3:\n{}\n{}\n{}".format(a, b, c))
Output:Count to 3:
one
two
three