Regex newbie in Python

Hi,

This is the first time i am using regex  and i am having trouble with an exercise. It may be very simple, and i am probably doing something very wrong but i can t figure out what.

I am supposed to check the format of mail adresses, following some rules:

-it has to begin with 1 to 4 letters between a and p

-then 0 to 5 numbers between 0 and 9

-then @gmail.com

I am trying to check if a mail adress is respecting those rules. I wrote:

‘([a-p]{1,4})([0,9]{0,5})([@]{1,1})[g][m][a][i][l][.][c][o][m]$’

It does not work all th time. Is that a good approach? Is there a better way to do it?

Thank you very much in advance for your help and understanding