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

Veröffentlicht am: 26 Dezember 2017
auf dem Kanal: 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...


Auf dieser Seite können Sie das Online-Video Lesson - 27 : Python3 - Python Function : Returning multiple values from Function mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Sada Learning Hub 26 Dezember 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 175 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!