add an single pattern pattern in python