Skip to content

Commit ec2bb8b

Browse files
authored
Update Name.py
1 parent 3a1bcba commit ec2bb8b

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

Other Programs/Name.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import re
22

3-
43
def is_valid_name(name):
5-
# This will only allow letters, spaces, hyphens, and apostrophes
64
return re.fullmatch(r"[A-Za-z\s\-']+", name) is not None
75

8-
9-
# 👤 Collects and validates the users input!
106
surname = input("Enter your surname: ")
117
forename = input("Enter your forename: ")
128

0 commit comments

Comments
 (0)