Python Find Substring Between Two Strings For Dreadlocks