How to prevent print from adding spaces in Python

3 Answers

0 votes
a = 3
b = 1

print(a, b, sep='')


'''
run:

31

'''

 



answered Nov 7, 2017 by avibootz
0 votes
import sys

sys.stdout.write('3')
sys.stdout.write('@1')


'''
run:

3@1

'''

 



answered Nov 7, 2017 by avibootz
0 votes
l = ['1', '@3']

print("".join(l))


'''
run:

1@3

'''

 



answered Nov 7, 2017 by avibootz

Related questions

...