View Single Post
Old 05-15-2011, 02:50 PM   #1
xXxXxXxXxXx
Enthusiast
xXxXxXxXxXx began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
replace multiple elements in url ?

How to replace multiple elements in url ?

J create this but it's only replace one element

/sex-love/dating-advice/ to /print-this/

def print_version(self, url):
newurl = url.replace('/sex-love/dating-advice/', '/print-this/')

how to replace more elements ?
xXxXxXxXxXx is offline   Reply With Quote