I was trying to make a random generator for DND Classes and Subclasses. I tried making a text file that looks like this:
Barbarian
Ancestral Guardian
Battle Rager
Beast
Berserker
Storm Herald
Totem Warrior
Wild Magic
Zealot
Bard
Creation
Eloquence
Glamour
Lore
Spirits
Swords
Valor
Whispers
Normally I would code in the data into a list like this:
backgrounds = {}
with open("./Data/backgrounds.txt") as text:
backgrounds = text.readlines()
text.close()
Is there anyway for it to read this data as say Barbarian Battle rager would be position (0,1) and bard glamour would be (1, 2)? Or is there a better way to format the data so it can be put into this 2D list? Thank you!