Am trying to compress a list using py-me but I get an Unpermitted modules Exception.
Here is my code:
def compress(li):
from itertools import zip_longest
return([i for i,j in zip_longest(li,li[1:]) if i!=j])
x = [1,2,3,4,5,6,6,6,6,7,7,7,8,9]
print(compress(x))
Py-me gave the following as response.
OUTPUT : Code was not executed due to Unpermitted Modules Exception EXCEPTION : Unpermitted Modules Exception : fromitertoolszip_longest <-^--- modules are not allowed to be used in py-me. Check documentation for permitted modules !
Thanks in advance.