Print without space in between values
Python 2
I have the following code:
value = 42
print 'Value is: "', value, '"'
I want it to output Value is "42"
, yet it produces Value is " 42 "
.
How do I print Value is "42"
?
(Answers use .format()
, +
and %
)
Python 3
I have the following code:
value = 42
print('Value is: "', 42, '"')
I want to output Value is "42"
, yet
produces Value is " 42 "
.
How do I get Value is "42"
(Answers use sep=''
, format
and +
)