write the re in python