While printing this dictionary that uses ascii art for the values, I realised that it will always print the values on top of each other rather than next to each other. I'm not sure how to make them line up next to each other.
def ABL():
ABLs = {
"B1": '''
---
| 1 |
---
''',
"B2": '''
---
| 2 |
---
''',
"B3": '''
---
| 3 |
---
''',
"B4": '''
---
| 4 |
---
'''
}
print(*ABLs.values())
This prints each value directly below the next one, and I am not sure how to make them sit in a row. Please help!
I tried changing the positioning of the apostrophes, but it resulted in the inability to use the ascii art.
Yes, you can use a combination of splitting the lines and zipping them back together:
Note that I had to add an extra space on the end of each of the lines:
---