Find and replace last occurrence of a character in string - Python
old_string = "MK-36-W-357-IJO-36-MDR"
k = old_string.rfind("-")
new_string = old_string[:k] + "." + old_string[k+1:]
#Result will be MK-36-W-357-IJO-36.MDR
Do you need any help on Python?
I'm happy to help you. Just fill the form on contact page
& I will get back to you within few hours.
- Get current store details - Magento 1.9
- Simple ways to improve page conversion on product page
- Encrypt Email Addresses - PHP
- The add_image_size() function - WordPress best practices
- Remove page title using filter - WordPress