Starson I know ask before but I'm still not clear on how to do it

if i have for instance the following link (example only)
http://www.testpage.com/doi/abs/10.1...495?ai=rv&af=R
but I need it to be the following
http://www.testpage.com/doi/full/10....viewType=Print
how would I do this?
I figure it would be some form or search and replace like i seen in beautiful soup but again i'm kinda clueless (any examples of this in action ? )
the abs needs to be replaced with full and then simply append the ?view part yet not sure how this is done

thanks again. I hope to learn something new.
Maybe something like ?
the above is just a non-working guess