I am reading through a python script that takes an input of XML files and outputs an XML file. However, I do not understand the printing syntax. Can someone please explain w
the f string is also known as the literal string to insert a variable into the string and make it part so instead of doing
x = 12
y = 10
word_string = x + ' plus ' + y + 'equals: ' + (x+y)
instead, you can do
x = 12
y = 10
word_string = f'{x} plus {y} equals: {x+y}
output: 12 plus 10 equals: 22
this will also help with spacing due to it will do exactly as the string is written