in scan function list out of range in corner cases is eliminated. if(e[0]==0): statement through error when return e is not array. exception without handling is chosen solution.
in scan function list out of range in corner cases is eliminated. if(e[0]==0): statement through error when return e is not array. exception without handling is chosen solution.