标签:
#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