Increment numbers in text with python

To Nha Notes | April 8, 2022, 2:55 p.m.

Input text:

    PARTITION p100 VALUES LESS THAN ('2022-07-22'),
    PARTITION p101 VALUES LESS THAN ('2022-08-01'),

Output text expected:

    PARTITION p110 VALUES LESS THAN ('2022-07-22'),
    PARTITION p111 VALUES LESS THAN ('2022-08-01'),

Code snipet in python shell:

import re
inp_str = """
    PARTITION p100 VALUES LESS THAN ('2022-07-22'),
  PARTITION p101 VALUES LESS THAN ('2022-08-01')
"""
partitions = re.findall(r'p\d+', inp_str)
for p in partitions:
    num = int(p[1:]) + 10
    inp_str = inp_str.replace(p, f"p{num}")

print(inp_str)