官术网_书友最值得收藏!

Returning values from a function

Functions can perform a set of defined operations and finally return a value at the end. Let's consider the following example:

def square(a): 
return a**2

In this example, the function returns a square of the argument. In Python, the return keyword is used to return a value requested upon completion of execution.

主站蜘蛛池模板: 重庆市| 河东区| 共和县| 璧山县| 精河县| 承德县| 太仆寺旗| 定南县| 卫辉市| 桦甸市| 华安县| 新泰市| 上高县| 西华县| 宜都市| 万盛区| 新安县| 铁岭县| 鸡东县| 华亭县| 玛曲县| 纳雍县| 吉安县| 固原市| 宁晋县| 民和| 东源县| 金昌市| 喀喇| 津南区| 耒阳市| 安新县| 江安县| 巴楚县| 扎赉特旗| 高唐县| 大化| 赤峰市| 萍乡市| 萍乡市| 丁青县|