Lesson - 27 : Python3 - Python Function : Returning multiple values from Function

Pubblicato il: 26 dicembre 2017
sul canale di: Sada Learning Hub
175
2

Python Function : Returning multiple values from Function:
Functions are the re-usable pieces of code which helps us to organize structure of the code. We create functions so that we can run a set of statements multiple times during in the program without repeating ourselves.

We can return multiple values from function using the return statement by separating them with  a comma ( ,). Multiple values are returned as tuples.

def bigger(a, b):
    if a > b:
        return a, b
    else:
        return b, a
 
s = bigger(12, 100)
print(s)
print(type(s))

Sample Projects : https://github.com/SadaLearningHub1/P...


In questa pagina del sito puoi guardare il video online Lesson - 27 : Python3 - Python Function : Returning multiple values from Function della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Sada Learning Hub 26 dicembre 2017, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 175 volte e gli è piaciuto 2 spettatori. Buona visione!