Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python function returns function

import random 
def probabilized(*args):
    def y():
        ps = []
        fs = []
        for arg in args:
            ps.append(arg["p"])
            fs.append(arg["f"])
        return fs[0]+fs[1]
    return y

        
      
x = probabilized({"p": 34 ,"f":"ffffff"}, {"p": 34 ,"f":"fwwwfffff"})
print(x())
 
PREVIOUS NEXT
Tagged: #python #function #returns #function
ADD COMMENT
Topic
Name
1+4 =