0

Python assinged value print

if I assign a value to a variable and another value to another variable can I print these variable simultaneously (side by side) if yes then how

14th Sep 2017, 7:17 PM
Himanshu Arya
Himanshu Arya - avatar
3 Answers
+ 9
a = 5 b = 'abc' print(a, b) # outputs 5 abc
14th Sep 2017, 8:14 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 4
two more ways: a = 'he' b = 'llo' print(b+a) together = '{0}{1}'.format(a, b)
14th Sep 2017, 8:25 PM
chessmonster
chessmonster - avatar
0
yes
14th Sep 2017, 7:51 PM
Enzo
Enzo - avatar