Skip to content

Instantly share code, notes, and snippets.

@joyc
Last active November 20, 2018 07:46
Show Gist options
  • Save joyc/db6c89bd822a9f9060f791b4af7bbe36 to your computer and use it in GitHub Desktop.
Save joyc/db6c89bd822a9f9060f791b4af7bbe36 to your computer and use it in GitHub Desktop.
Note Of Python Tutorial #memo #note

Tutorial Note

1

设置系统变量: set path=%path%;C:\python36

5 Data Structures

5.1.4

  1. python list tuple

8 エラーと例外

  1. 構文エラー (syntax error) と 例外 (exception)

  2. forのelseはforにbreakが無ければ必ず実行されます 一种更简单的办法是在循环中添加一条else子句,它仅在没有调用break时才执行。继续前面讨论break时的示例。

from math import sqrt for n in range(99, 81, -1): root = sqrt(n) if root == int(root): print(n) break else: print("Didn't find it!") 2. isinstance() 检查一个实例的类型
issubclass() 检查类之间的继承关系

https://ccie-go.com/python-exam-study/ 出題範囲のうち、3,4,5,8,10章は出題数が多い

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment