""" Write a function validZIP that has one parameter - string. Function returns True, if the string represents valid ZIP Code and False otherwise. The valid ZIP Code has the following format: XXXXX-XXXX, and each section consists of digits only. For example, 19013-5792 is a valid ZIP Code but a1234-1234 is NOT. Write main that tests your function on the LIST OF STRINGS """ def validZIP(str): size=len(str) if(size!=10): return False else: str1=str[0:5] str2=str[6:] if(str1.isdigit() and str2.isdigit() and str[5]=='-'): return True else: return False def make_list_string(size): list=[] for i in range(size): str=input("enter string ") list.append(str) return list def main(): list=make_list_string(10) print(list) valid_zip=[] not_valid_zip=[] for item in list: if(validZIP(item)): valid_zip.append(item) else: not_valid_zip.append(item) print(valid_zip) print(not_valid_zip) main()