From d8046d42471103ae040eac6e81a50581839c9d0b Mon Sep 17 00:00:00 2001 From: jackfrued Date: Mon, 23 Jul 2018 00:32:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Day21-30/code/demo01/qq_link.html | 2 +- ...42\350\257\225\346\214\207\345\215\227.md" | 66 ------------------- 2 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 "\351\235\242\350\257\225\346\214\207\345\215\227.md" diff --git a/Day21-30/code/demo01/qq_link.html b/Day21-30/code/demo01/qq_link.html index 0671702..1418ef0 100644 --- a/Day21-30/code/demo01/qq_link.html +++ b/Day21-30/code/demo01/qq_link.html @@ -5,6 +5,6 @@ - 点我聊一聊 + 聊我吧 \ No newline at end of file diff --git "a/\351\235\242\350\257\225\346\214\207\345\215\227.md" "b/\351\235\242\350\257\225\346\214\207\345\215\227.md" deleted file mode 100644 index 1b94d14..0000000 --- "a/\351\235\242\350\257\225\346\214\207\345\215\227.md" +++ /dev/null @@ -1,66 +0,0 @@ -## 面试指南 - -### 基础知识 - -1. 下面的代码会输出什么。 - - ```Python - - list1 = [1, 2, 3, 4] - - list2 = [i for i in list1 if i > 2] - print(list2) - - list3 = [i for i in list1 if i % 2] - print(list3) - - dict1 = {x: x ** 2 for x in (2, 4, 6)} - print(dict1) - - dict2 = {x: f'item{x ** 2}' for x in (2, 4, 6)} - print(dict2) - - set1 = {x for x in 'hello world' if x not in 'abcdefg'} - print(len(set1)) - ``` - -2. 下面的代码会输出什么。 - - ```Python - - num = 100 - - - def foo(): - num = 200 - - - def bar(): - print(num) - - - bar() - foo() - bar() - ``` - -3. 如何修改下面的Python代码,才能够输出“foo in father”? - - ```Python - - class Father(object): - - def foo(self): - print('foo in father.') - - - class Son(object): - - def foo(self): - print('foo in son.') - - - obj = Son() - obj.foo() - ``` - -- GitLab