摘要: def my_decorator(func): def wrapper(): print("Something is happening before the function is called.") func() print("Something is happening after the f 阅读全文
posted @ 2020-05-30 19:25 Zhentiw 阅读(120) 评论(0) 推荐(0)
摘要: The same as Javascript: // Javascript function sayHello(name) { return `Hello ${name}` } //python def say_hello(name): return f"Hello {name}" 阅读全文
posted @ 2020-05-30 19:23 Zhentiw 阅读(121) 评论(0) 推荐(0)
摘要: class Clothing: def __init__(self, color, size, style, price): self.color = color self.size = size self.style = style self.price = price def change_pr 阅读全文
posted @ 2020-05-30 00:53 Zhentiw 阅读(170) 评论(0) 推荐(0)