Type Mark Family renumbering

Hi all

I want to share with you a script on how to renumbering the type of a category and at the same time I am asking you some help relating to the script

Let’s say we want to renumber/give a number to the Door’s Type Mark

Let’s say we have Single Door : 3 type of dimensions , and Double Door : 2 types of dimensions.

So 2 Family : Single and Double Door, 3 types for the single door and 2 types for the double

Below my script to give a name to the types.
To be quick I named the Types with a sequence of number, from 1 to 5

Now comes my concern

I want to name the door in

1.1
1.2
1.3

and

2.1
2.2

because I have 3 single doors and 2 double doors

I am sure it is about managing list, but I am at the beginning, I have tried somethings but I can’t manage it.
I appreciate any kind of help

Thanks