I'm trying to get two values or a set of strings in separate columns.
The code below will randomize two letters from the list. The issue I'm having with this is that they keep returning in vertical and I would like to print them next to each other. I tried several ways and none of them work. They either print them the same way as the below output or just print every character individually even the ╔, \n, etc.
import random
letters = {'A', 'B', 'C'}
letter = list(letters)
for _ in range(2):
random_letter = random.choice(letter)
print(" ╔═══╗\n", f"║ {random_letter} ║\n", "╚═══╝", end='')
The method above returns this,
╔═══╗
║ A ║
╚═══╝╔═══╗
║ C ║
╚═══╝
This other method returns it like this,
print("╔═══╗", f"║ {random_letter} ║", "╚═══╝", end='')
╔═══╗ ║ A ║ ╚═══╝╔═══╗ ║ C ║ ╚═══╝
I would like it to return like this,
╔═══╗╔═══╗
║ A ║║ C ║
╚═══╝╚═══╝