def print_version(self, url): print 'ORG URL IS: ', url split1 = url.split("/") print 'THE SPLIT IS: ', split1 id = len(split1) # we want to find the size of the array split # because we know the id will always be in the last index print_url = ‘http://www.business-standard.com/india/printpage.php?autono=’ + split1[id]+ ‘&tp=’ return print_url