How to avoid new line with print command in Python

2 Answers

0 votes
print('python', end=" ")
print('java')

'''
run:

python java

'''

 



answered Nov 14, 2017 by avibootz
0 votes
import sys

sys.stdout.write('python')
sys.stdout.write(' java')


'''
run:

python java

'''

 



answered Nov 14, 2017 by avibootz
...