Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
Python 2 equivelant of print(*array)
Asked
Nov 12 '20 at 16:52
Active
Nov 12 '20 at 16:52
Viewed
18 times
0
0
Can anyone suggest python 2 equivelant of python 3 statement:
a = [1,2,3] print(*a)
Output: 1 2 3
python
asked Nov 12 '20 at 16:52
Aman Oswal
49
5
1
If you `from __future__ import print_function`, you can use the 3.x print in 2.x.
–
jonrsharpe
Nov 12 '20 at 16:54
3
``print ' '.join(map(str, a))``?
–
MisterMiyagi
Nov 12 '20 at 16:54
0 Answers
0