lundi 9 octobre 2023

What is good pattern in python for returning value [closed]

Recently, I became curious about what is a good pattern for the form of return value.

Which do you think is a good pattern among numbers 1 and 2 below?

1)

def test():
    a = get_some_value()
    return a
    def test()
        return get_some_value()
    

    I want to know what good pattern in.

    Aucun commentaire:

    Enregistrer un commentaire