def is_leaf(obj):
if(is_list(obj)):<EOL><INDENT>length = obj.__len__()<EOL>if(length == <NUM_LIT:0>):<EOL><INDENT>return(True)<EOL><DEDENT>else:<EOL><INDENT>return(False)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return(True)<EOL><DEDENT>
the below is for nested-list
any type is not list will be treated as a leaf
empty list will be treated as a leaf
from elist.elist import *
is_leaf(1)
is_leaf([1,2,3])
is_leaf([])