Remove string in python dictionary value

import re

new_d = {key: re.sub('^.*/', '', val) for key, val in d.iteritems()}

Browse More Popular Posts

Leave a Comment