I want to print the module statement as it is above the command line: For example, it should look like this:
12
2% 4
or
thirty%
40%
I use the print statement as follows:
print 'calculations% s %% s'% (num1, pit2)
It throws a default error:
TypeError: not all arguments are converted during string formatting
I am currently using:
print 'compute 1' + '%' + '2'
which prints:
calculation 1% 2
But tell how to do this using the first approach (: print 'computing% s %% s'% (num1, num2))
source share