Open Sayan-Roy-729 opened 1 year ago
print(a '\n' b '\n' c)
In above code there is Syntax error. Comma is missing.
print(a,'\n', b, '\n', c) #This is correct syntax to print value of a, b and c in three different lines.
If you want to print value of a, b and c separated by space write print(a, b, c)
If I declare 3 numbers(integer variables) let's say a,b,c, and give them some values. Then if I print them by the syntax print(a,'\n', b, '\n', c) it works and I get output in different lines. But with one space so I tried to use the syntax "print(a '\n' b '\n' c)" but it didn't work and I got error what is the issue?