码迷,mamicode.com
首页 > 其他好文 > 详细

面向对像(7day)

时间:2017-09-27 21:52:51      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:port   add   import   全局   html   return   col   http   不能   

#
#
# x=3
#
在python中能开辟作用域的就是函数,类,还有模块
#
#
#
# for i in range(10):  # for循环不能开辟作用域,一定义就是全局的,还有if else也是不能
#     x=55
#
# def f():
#     x=5
#     y=4
#
#     print(x)
#
#
# class A():
#     c=3
#
#
# print(c)
#


def add(x,y):

    return x+y


import re

 http://www.cnblogs.com/yuanchenqi/articles/6766020.html

参考模块的博客

面向对像(7day)

标签:port   add   import   全局   html   return   col   http   不能   

原文地址:http://www.cnblogs.com/wanchenxi/p/7604000.html

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