I was writing a little code, that I left below:
"""
for(i=0;i<{0};i++){
eventObj
}
""".format('5')
it shows the next error:
KeyError: '\n eventObj\n '
but if I write:
"""
for(i=0;i<%s;i++){
eventObj
}
""" % ('5')
it doesn't show error and works without any kind of problem, I thought that both are equivalent
The question is: why happen that?