Python內建函數(30)——hex,python內建函數hex英文文檔:hex(x) Convert an integer number to a lowercase hexadecimal string prefixed with “0x”, for exampleIf x is not a Python int object, it has to define an __index__() method that returns an integer. 說明: 1.
Python內建函數(25)——getattr,pythongetattr英文文檔:getattr(object, name[, default])Return the value of the named attribute of object. name must be a string. If the string is the name of one of the object’s attributes, the result is the value of that
Python內建函數(17)——divmod,pythondivmod英文文檔:divmod(a, b) Take two (non complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using integer division. With mixed operand types, the rules for binary
Python內建函數(18)——enumerate,pythonenumerate英文文檔:enumerate(iterable, start=0) Return an enumerate object. iterable must be a sequence, an iterator, or some other object which supports iteration. The __next__() method of the iterator returned by