print '%d is digit' % -1233.3 print '%s is string' % -1235.5 print '%s is string' % '"Python"' print '%5.2f is digit and %s is string' % (-254.3, '"Python"') -------------------------------output--------------------- -1233 is digit -1235.5 is string "Python" is string -254.30 is digit and "Python" is string