have only a single file in dir with a png extension : htp_nyaguwbf_1568431.png
how to fetch the file using python and not inputting file name. But by getting the file name using extension .png and change its name to test.png
this code will fetch the file and store it in file variable.
import glob, os
for file in glob.glob("*.png"):
print(file)
how to change the name of the file