Remove string in python dictionary value April 8, 2022 by Tarik Billa import re new_d = {key: re.sub('^.*/', '', val) for key, val in d.iteritems()} Browse More Popular Posts dma vs interrupt-driven i/o three.js set and read camera look vector Benchmarking VBA Code Generating all permutations of N balls in M bins Angular 2 input parameters on root directive [duplicate] Triple pointers in C: is it a matter of style? R cannot be resolved to a variable Renaming the created_at, updated_at columns of ActiveRecord/Rails C – Serialization of the floating point numbers (floats, doubles) Connecting to a Websphere MQ in Java with SSL/Keystore Find K nearest neighbors, starting from a distance matrix Communications link failure , Spring Boot + MySql +Docker + Hibernate How to find USB drive letter? The method format(String, Object[]) in the type String is not applicable for the arguments (…) Forward geocoding from the iPhone Can’t apply system screen brightness programmatically in Android How to avoid temporary allocations when using a complex key for a HashMap? Python file operations Virtual tables and memory layout in multiple virtual inheritance How to set redirect_uri protocol to HTTPS in Azure Web Apps