I need a script (preferably python in .py script format) to do the following.
Text file 1 is a list of words e.g.
word1
word2
word3
etc.
Text file 2 is another list of words
e.g.
add1
add2
add3
The script should merge the 2 files by adding each word from file 2, to the start OR end of words in file 1.
e.g.
word1 add1
word1 add2
word1 add3
word2 add1
word2 add2
word2 add3
word3 add1
word3 add2
word3 add3
The script should be able to control whether the words from file 2 are added at the start or end of words in file 1. e.g. word1 add1 (end) VS. add1 word1 (start).
That's it.