I am a beginner of Python.
I am trying to create a text file with using %s (I saw the example from textbook, but I don't know what %s exactly means here:
quizFile=open('%scapitalsquiz.txt'%2018,'w')
quizFile.write('%s. capital of %s?\n'%(1, 'New York'))
quizFile.close()
the above code will give me a text file whose name is: 2018capitalsquiz
so the %s is repalced by %2018
Also in my content of the text file, I have: 1. capital of New York?
so two %s are replaced correspondingly by 1 and New York, I just want to know what is exactly function here?