This is because 2 and 1 are integers, not strings. In general, if you want to do this in any context other than printing, you will first have to convert them to strings. For instance:
myNumber1 = ... myNumber2 = ... myCombinedNumberString = str(myNumber1)+str(myNumber2)
In the print context, you'd rather do what Rafael offers in his answers (string formatting operator). I personally would do it like this:
print( '{}{}'.format(2,1) )
source share