I want to print int in multi-line
Here is my python code:
a=int(3)
b=int(5)
c=a+b,"\n",a-b,"\n",a*b,"\n"
print(c)
Output I want to achieve:
8
-2
15
Output I’m getting:
(8, '\n', 2, '\n', 15, '\n')
Will someone help me out with this?
>Solution :
You could iteratively print the elements of c.
a = int(3)
b = int(5)
c = a+b, a-b, a*b
for i in c:
print(i)