删除了不必要的文件
parent
69b3005a36
commit
d8046d4247
|
@ -5,6 +5,6 @@
|
|||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=957658&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:957658:53" alt="点我聊一聊" title="点我聊一聊"/></a>
|
||||
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=957658&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:957658:51" alt="聊我吧" title="聊我吧"/></a>
|
||||
</body>
|
||||
</html>
|
66
面试指南.md
66
面试指南.md
|
@ -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()
|
||||
```
|
||||
|
Loading…
Reference in New Issue