Mayx's Home Page https://mabbs.github.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
839 B

  1. ---
  2. layout: post
  3. title: Mayx应聘失败(Python版)
  4. tags: [应聘, Python, 面向时间]
  5. ---
  6. 既然最近学了Python,那就去应聘一下Python程序员吧XD<!--more-->
  7. [上次去面试运维失败了](/2019/01/27/shell.html),这次不能这么丢人了。
  8. 然后那个面试官居然又让我写排序的程序23333
  9. Mayx想了想,写出了以下代码:
  10. ```python
  11. a=[1,2,3,5,4,9,10,8,5]
  12. import threading
  13. import time
  14. def counting(i):
  15. time.sleep(i)
  16. print(i)
  17. for i in a:
  18. threading.Thread(target=counting,args=(i,)).start()
  19. ```
  20. 执行效果:
  21. ```
  22. 1
  23. 2
  24. 3
  25. 4
  26. 5
  27. 5
  28. 8
  29. 9
  30. 10
  31. ```
  32. 然后,Mayx被赶出来了……
  33. 我写的代码明明可以执行,效果也没问题,居然赶我出来,这一定是个垃圾公司!
  34. 后来才知道,他们又想让我回答`sort()`,怕是同一家公司(笑)

Powered by TurnKey Linux.