DS160123 Re. used for pincode

Date:-16/03/2023
#Pincode —> 6 number [1st number(1-9) and rest 5 number (0-9)]

import re

pincode=input(‘enter your pincode’)

result=re.findall(“^[1-9]{1}\d{5}$”,pincode)

print(result)

2 Likes

Wow @sms18680 . keep it up

1 Like