キーワード
1 2 3 4 5 6 7 8 9 10 11 |
>>> import keyword >>> for s in keyword.kwlist: print(s) ... False None True and as ..... with yield |
キーワードの一覧は以下の通り。
False, None, True, and, as, assert, async, await, break, class, continue, def, del, elif, else, except, finally, for, from, global, if, import, in, is, lambda, nonlocal, not, or, pass, raise, return, try, while, with, yield
組み込み関数
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
>>> for s in dir(__builtins__): print(s) ... ArithmeticError AssertionError ...... _ __build_class__ __debug__ ..... abs all ..... vars zip |
このうちabs以降の一覧は以下の通り。
abs, all, any, ascii, bin, bool, breakpoint, bytearray, bytes, callable, chr, classmethod, compile, complex, copyright, credits, delattr, dict, dir, divmod, enumerate, eval, exec, exit, filter, float, format, frozenset, getattr, globals, hasattr, hash, help, hex, id, input, int, isinstance, issubclass, iter, len, license, list, locals, map, max, memoryview, min, next, object, oct, open, ord, pow, print, property, quit, range, repr, reversed, round, set, setattr, slice, sorted, staticmethod, str, sum, super, tuple, type, vars, zip