I would like to put an int into a string. This is what I am doing at the moment:
int
string
num = 40 plot.savefig(\'hanning40.pdf\') #problem
I had a need for an extended version of this: instead of embedding a single number in a string, I needed to generate a series of file names of the form 'file1.pdf', 'file2.pdf' etc. This is how it worked:
['file' + str(i) + '.pdf' for i in range(1,4)]