I would like to use a variable as an integer and a string in the same statement. In BASIC, it would look like this:
cnt = 0
while cnt < 10:
cnt = cnt + 1
print cnt + " + 1 = " + cnt + 1
I understand it's a bit different with Python (integers have to be converted before you print them as strings, but here using a function such as "cnt = str(cnt)" doesn't seem to work very well). What would be the easy way to do this?