I'm just a beginner in python. I was just writing some code to print table of any number and I surprisingly got different answers on python v2.7 & python v3.5! This occur only when I use string function, not when I use comma(,).

I'm just a beginner in python. I was just writing some code to print table of any number and I surprisingly got different answers on python v2.7 & python v3.5! This occur only when I use string function, not when I use comma(,).

The difference is the type of 'n'. It is treated as an integer than you get the numeric operation '', in the other case it is treated as string with the string operation ''. Try out type(n) after you read it and you will see the difference.