使用当前浏览器访问考试宝,无法享受最佳体验,推荐使用 Chrome 浏览器进行访问。
更新时间: 试题数量: 购买人数: 提供作者:
有效期: 个月
章节介绍: 共有个章节
我的错题 (0道)
我的收藏 (0道)
我的斩题 (0道)
我的笔记 (0道)
顺序练习 练习进度 0 / 0
随机练习 自定义设置练习量
模拟考试 仿真模拟
题型练习 按题型分类练习
易错题 精选高频易错题
学习资料 考试学习相关信息
class Student:
def __init__(self, n = "xxx", s = "女"):
self.name = n
self.sex = s
def show(self):
print(self.name, self.sex, self.age)
s = Student("yyy")
s.name = "zzz"
s.age = 18
s.show()
class A:
def __init__(self):
print("A init", end = ' ')
class B(A):
super().__init__()
print("B init", end = ' ')
class C(B):
print("C init", end = ' ')
c = C()
def foo(a, *args, **kwargs):
print(a, end = ' ')
print(args, end = ' ')
print(kwargs, end = ' ')
foo(1, 2, 3, x=4, y=5)
def outer():
x = 10
def inner():
nonlocal x
x += 1
return x
return inner
f = outer()
print(f(), end = ' ')
for i in range(3):
print(i, end = ' ')
if i == 1:
break
else:
print("循环结束")