Python Forum
How to concatenate horizontally
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to concatenate horizontally
#1
Hi,
I have below two matrices:
a=2
b=4
I want to concatenate them horizontally:

my desired  output:
2
4

Many thanks in advance,
Reply
#2
Those looks like regular ints, not matricies (unless they're 1x1 matrices for some reason?). Any reason you can't just print them one after the other?
Reply
#3
It could be something lost in translation but for me an output of
2
4
is 'vertical', whereas
2 4
is horizontal
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  "can only concatenate tuple"? wlsa 2 14,836 Jul-24-2018, 05:44 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020