It's probably simpler if you change your method to just return a list of the lines for the cards, then you can zip
those together and print them.
def get_card(card):
suit = card[0]
value = card[1:] # 1: for '10'
return (
'┌─────────┐
'
'│{} │
'
'│ │
'
'│ │
'
'│ {} │
'
'│ │
'
'│ │
'
'│ {}│
'
'└─────────┘'
).format(
format(value, ' <2'),
format(suit, ' <2'),
format(value, ' >2')
).splitlines()
def display_cards(cards):
for lines in zip(*map(get_card, cards)):
print(*lines)
cards= ["?2", "?3", "?4"]
display_cards(cards)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…