I want to read a list. edit it and then save it.
List looks like
word1
word2
word3
I want to edit word1 only if word2 = posp (for example).
but how do I print out the list in the same order ie
word1 (amended)
word2 ( word1 amended only because word2 = posp (for example))
word3 (same as before)