码迷,mamicode.com
首页 > 编程语言 > 详细

python——函数和过程的区别

时间:2018-03-22 14:07:45      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:author   pre   test   过程   ret   pos   testing   body   auth   

函数编程和过程编程的区别

__author__ = "Alex Li"
#函数编程
def func1():
    """testing1"""
    print(‘in the func1‘)
    return 0
#过程编程
def func2():
    ‘‘‘testing2‘‘‘
    print(‘in the func2‘)

x=func1()
y=func2()

print(‘from func1 return is %s‘ %x)
print(‘from func2 return is %s‘ %y)

  

python——函数和过程的区别

标签:author   pre   test   过程   ret   pos   testing   body   auth   

原文地址:https://www.cnblogs.com/xgzx/p/8623248.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!