Assume a list of keyword is given, eg. ['abc', 'def', 'ghjk', 'lmn']
, and an output string is generated from the list using a specific template. For example, string '(abc)(def)(ghjk)(lmn)'
is the desired output.
Here is a neat Python code to achieve it:
1 |
|