Python print output

topic description

print (1)

sources of topics and their own ideas

I have tried to solve the problems encountered in my practice, such as print, but this has changed the type of 2, so I don"t want to do it.
hasn"t figured it out for a long time.
is there any way? How to solve it? In a hurry?

related codes

print
1
Space2

the effect I want is

can only be modified in print () parentheses. Do not change the data type of 1 br 2, and do not wrap lines in parentheses

how to solve the space before 2 brought by this comma,

Apr.07,2021

print (1,'\ ntimes, 2, sep='')


def p(*args):
    print(''.join([str(i) for i in args])) -sharpprint' '.join([str(i) for i in args])
  
p(1, '\n', 2) -sharp

if you have to use print

_print = print
print = lambda *args: _print(''.join([str(i) for i in args]))
print(1, '\n', 2) -sharp
Menu