I am new to Python, so I'm not sure what this operation is called, so it's hard for me to find the information in it.
Basically, I would like to have a line such as:
"[[size]] widget that [[verb]] [[noun]]"
Where size, verb and noun are a list.
I would like to interpret the string as a metalanguage so that I can make many sentences from permutations from lists. As a metalanguage, I would also be able to make other lines that use these predefined lists to generate more permutations.
Are there any possibilities for substituting variables like this in Python? What term describes this operation if I should just google it?
source
share