I have a string as follows:
”This 1 is just a 1 and 1 is just a number. And 1 + 1 is equal to 2”
When I want to use python format it would be something like:
var = 1
test = "This {} is just a {} and {} is just a number. And {} + {} is equal to 2".format(var,var,var,var,var)
But I would like to know if there is any quick replacement for str.format() in python for avoid repetition. Something like:
test = "This {} is just a {} and {} is just a number. And {} + {} is equal to 2".format(var*)