My code :
JavaScript
x
5
1
a='hello'
2
b= 10
3
c=a, b
4
print (c)
5
The output :
JavaScript
1
2
1
('hello', 10)
2
the output i want :
hello 10
basically i want to remove the ‘ , () thanks in advance
Advertisement
Answer
Here is a list of all the ways:
JavaScript
1
16
16
1
#Using f-strings
2
print(f"{a} {b}")
3
4
#List Method
5
print(*c)
6
7
#For Loops
8
for i in c:
9
print(i,end=" ") #MAKES NO SENSE AT ALL. But is a method.
10
11
#String Concatenation
12
print(a+b)
13
14
#Print Normally
15
print(a, b)
16