Fixed position will be inserted into the corresponding Python content

I have two A document, the B document.
A document is a place I want to insert B document content, such as: keyword1, keyword2, keyword3, keyword4, one line,
B document is one or more sentences in a row (for example: ABC efghi libage poveiv bive insertion insertion position. Position number) sometimes inserted keyword different, may be a possible 2 and possibly 3, A document into a B document on the first line of the first line of the sentence boundary.

Started by Yale at December 08, 2016 - 1:07 AM

Also do not understand what you said "insert" is what
But can you refer to
a=dict(A) # In the dictionary
b=str(B) # The insertion position and the corresponding number of a.keys, can be less, not more
b.format(**a) Is the need of the results

A style
{'Insert the 1': keyword_1,...... 'insert position n':keyword_n}
B style
'abc efghi libage {Insert the 1} poveiv bive {n insertion position.}'
Note that in addition to the insertion position and brace condition

Posted by Zero at December 11, 2016 - 1:27 AM


Thanks for the tip, good, I'll try

Posted by Yale at December 18, 2016 - 1:41 AM

The insertion position in a regular or the same? If not, if the insertion point many, format is not just don't work.?

Posted by Benedict at January 02, 2017 - 2:26 AM