-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdfunc.py
More file actions
35 lines (27 loc) · 846 Bytes
/
stdfunc.py
File metadata and controls
35 lines (27 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def std_issymb(char: str) -> bool:
char_list = r"{}()[];,."
if char in char_list:
return True
else:
return False
def std_isnumeric(char: str) -> bool:
char_list = r"1234567890"
if char in char_list:
return True
else:
return False
def std_isalpha(char: str) -> bool:
char_list_lower = r"abcdefghijklmnopqrstuvwxyz"
char_list_upper = char_list_lower.upper()
if char in char_list_lower or char in char_list_upper:
return True
else:
return False
def std_isalphanumeric(char: str) -> bool:
char_list_lower = r"abcdefghijklmnopqrstuvwxyz"
char_list_upper = char_list_lower.upper()
char_list = r"1234567890"
if (char in char_list_lower) or (char in char_list_upper) or (char in char_list):
return True
else:
return False