Example:
element = ['Flaming', 'Cold']
fire_properties = ['of Fire', 'of Flame']
cold_properties = ['of Ice', 'of Frost']
Fairly simple. Wanted to make a text randomizer and end up with results such as “Flaming sword of Fire” according to this example. Unfortunately, i wasn’t sure of how to make it so that the result from the first list would define from which list the second result would be.
Well, I first wrote this one, but Boris’s was more succinct, so I decided not to submit… might be a bit more readable for a beginner, though.
Though in real project I’d generalize it further like Boris did.