首页 > 编程语言 > 详细

Python 2.7.9 Demo - 020.函数的定义、返回

时间:2015-07-03 00:04:23      阅读:245      评论:0      收藏:0      [点我收藏+]

 

#coding=utf-8
#!/usr/bin/python

def setConfig():
    hello = world;
    print The value has been setted.;
    return hello;
    
hello_cp = setConfig();
print print outside :  + hello_cp;

 

#coding=utf-8
#!/usr/bin/python

def setConfig():
    dict = {username : nick huang, age : 18};
    print The value has been setted.;
    return dict;
    
dict_cp = setConfig();
print print outside : ;
for key in dict_cp.keys():
    print dict_cp[key];

 

Python 2.7.9 Demo - 020.函数的定义、返回

原文:http://www.cnblogs.com/nick-huang/p/4617324.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!