There is a basename variable; it has constantly changing text; for example, text is another variable, convert . How to transfer the value of the basename variable to the convert variable and add the ending .png to it. In summary, it should look like this.

 print (convert) text.png 
  • one
    '{}.png'.format(basename) - ThisMan

1 answer 1

 convert = '{}.png'.format(basename)