"""
This exercise stub and the test suite contain several enumerated constants.
Enumerated constants can be done with a NAME assigned to an arbitrary,
but unique value. An integer is traditionally used because it’s memory
efficient.
It is a common practice to export both constants and functions that work with
those constants (ex. the constants in the os, subprocess and re modules).
https://en.wikipedia.org/wiki/Enumerated_type
"""# Possible sublist categories.
# Change the values as you see fit.
SUBLIST=1SUPERLIST=2EQUAL=3UNEQUAL=0defis_sublist(A:list,B:list)->bool:"""True if list_one is a contiguous slice in list_two"""lenA,lenB=len(A),len(B)iflenA==0:returnTrueiflenA>lenB:returnFalsereturnany(B[i:i+lenA]==Aforiinrange(lenB-lenA+1))defsublist(A:list,B:list):"""
return - relationship between lists A and B
relation is one of 'equal', 'sublist', 'superlist', 'unequal'.
"""ifA==B:returnEQUALelifis_sublist(A,B):returnSUBLISTelifis_sublist(B,A):returnSUPERLISTreturnUNEQUAL