Python - re.sub in for loop

[โจทย์]
re.sub แปลงสติงโดยนำ Pattern ค่า 1-10 จาก loop for ทีละรอบ
  • ต้องใช้ str() แปลง x เป็น String