📖 Python 参考手册
📁Python 内置函数
68 个项目
📁Python 字典方法
11 个项目
📁Python 列表方法
11 个项目
📁Python 集合方法
18 个项目
📁Python 字符串方法
44 个项目
📁Python 元组方法
2 个项目
📖 Python 参考手册
Python 内置函数
- Python abs() 函数 returns absolute value of a number
- Python any() 函数 Checks if any Element of an Iterable is True
- Python all() 函数 returns true when all elements in iterable is true
- Python ascii() 函数 Returns String Containing Printable Representation
- Python bin() 函数 converts integer to binary string
- Python bool() 函数 Converts a Value to Boolean
- Python bytearray() 函数 returns array of given byte size
- Python callable() 函数 Checks if the Object is Callable
- Python bytes() 函数 returns immutable bytes object
- Python chr() 函数 Returns a Character (a string) from an Integer
- Python compile() 函数 Returns a Python code object
- Python classmethod() 函数 returns class method for given function
- Python complex() 函数 Creates a Complex Number
- Python delattr() 函数 Deletes Attribute From the Object
- Python dict() 函数 Creates a Dictionary
- Python dir() 函数 Tries to Return Attributes of Object
- Python divmod() 函数 Returns a Tuple of Quotient and Remainder
- Python enumerate() 函数 Returns an Enumerate Object
- Python staticmethod() 函数 transforms a method into a static method
- Python filter() 函数 constructs iterator from elements which are true
- Python eval() 函数 Runs Python Code Within Program
- Python float() 函数 returns floating point number from number, string
- Python format() 函数 returns formatted representation of a value
- Python frozenset() 函数 returns immutable frozenset object
- Python getattr() 函数 returns value of named attribute of an object
- Python globals() returns dictionary of current global symbol table
- Python exec() 函数 Executes Dynamically Created Program
- Python hasattr() 函数 returns whether object has named attribute
- Python help() 函数 Invokes the built-in Help System
- Python hex() 函数 Converts to Integer to Hexadecimal
- Python hash() 函数 returns hash value of an object
- Python input() 函数 reads and returns a line of string
- Python id() 函数 Returns Identify of an Object
- Python isinstance() 函数 Checks if a Object is an Instance of Class
- Python int() 函数 returns integer from a number or string
- Python issubclass() 函数 Checks if a Class is Subclass of another Class
- Python iter() 函数 returns an iterator
- Python list() 函数 creates a list in Python
- Python locals() 函数 Returns dictionary of a current local symbol table
- Python len() 函数 Returns Length of an Object
- Python max() 函数 returns the largest item
- Python min() 函数 returns the smallest value
- Python map() 函数 Applies Function and Returns a List
- Python next() 函数 Retrieves next item from the iterator
- Python memoryview() 函数 returns memory view of an argument
- Python object() 函数 creates a featureless object
- Python oct() 函数 returns the octal representation of an integer
- Python ord() 函数 returns an integer of the Unicode character
- Python open() 函数 Returns a file object
- Python pow() 函数 returns the power of a number
- Python print() 函数 Prints the Given Object
- Python property() 函数 returns the property attribute
- Python range() 函数 returns a sequence of integers
- Python repr() 函数 returns a printable representation of the object
- Python reversed() 函数 returns the reversed iterator of a sequence
- Python round() 函数 rounds a number to specified decimals
- Python set() 函数 constructs and returns a set
- Python setattr() 函数 sets the value of an attribute of an object
- Python slice() 函数 returns a slice object
- Python sorted() 函数 returns a sorted list from the given iterable
- Python str() 函数 returns the string version of the object
- Python sum() 函数 Adds items of an Iterable
- Python tuple() 函数 Returns a tuple
- Python type() 函数 Returns the type of the object
- Python vars() 函数 Returns the dict attribute
- Python zip() 函数 Returns an iterator of tuples
- Python import() 函数 Function called by the import statement
- Python super() 函数 Returns a proxy object of the base class
Python 字典方法
- Python 字典 clear() 方法 Removes all Items
- Python 字典 copy() 方法 Returns the Shallow Copy of a Dictionary
- Python 字典 fromkeys() 方法 creates dictionary from given sequence
- Python 字典 get() 方法 Returns Value of The Key
- Python 字典 items() 方法 returns view of dictionary's (key, value) pair
- Python 字典 keys() 方法 Returns View Object of All Keys
- Python 字典 popitem() 方法 Returns & Removes Latest Element From Dictionary
- Python 字典 setdefault() 方法 Inserts Key With a Value if Key is not Present
- Python 字典 pop() 方法 removes and returns element having given key
- Python 字典 values() 方法 returns view of all values in dictionary
- Python 字典 update() 方法 Updates the Dictionary
Python 列表方法
- Python 列表 append() 方法 Add a single element to the end of the list
- Python 列表 extend() 方法 adds iterable elements to the end of the list
- Python 列表 insert() 方法 insert an element to the list
- Python 列表 remove() 方法 Removes item from the list
- Python 列表 index() 方法 returns the index of the element in the list
- Python 列表 count() 方法 returns count of the element in the list
- Python 列表 pop() 方法 Removes element at the given index
- Python 列表 reverse() 方法 reverses the list
- Python 列表 sort() 方法 sorts elements of a list
- Python 列表 copy() 方法 returns a shallow copy of the list
- Python 列表 clear() 方法 Removes all Items from the List
Python 集合方法
- Python 集合 remove() 方法 removes the specified element from the set
- Python 集合 add() 方法 adds element to a set
- Python 集合 copy() 方法 Returns Shallow Copy of a Set
- Python 集合 clear() 方法 remove all elements from a set
- Python 集合 difference() 方法 Returns Difference of Two Sets
- Python 集合 difference_update() 方法 Updates Calling Set With Intersection of Sets
- Python 集合 discard() 方法 Removes an Element from The Set
- Python 集合 intersection() 方法 Returns Intersection of Two or More Sets
- Python 集合 intersection_update() 方法 Updates Calling Set With Intersection of Sets
- Python 集合 isdisjoint() 方法 Checks Disjoint Sets
- Python 集合 issubset() 方法 Checks if a Set is Subset of Another Set
- Python 集合 issuperset() 方法 Checks if a Set is Superset of Another Set
- Python 集合 pop() 方法 Removes an Arbitrary Element
- Python Set symmetric_difference() 方法 Returns the symmetric difference of sets
- Python Set symmetric_difference_update() 方法 Updates the Set with symmetric difference
- Python Set union() 方法 Returns the union of sets
- Python Set update() 方法 Add elements to the set
- Python frozenset() 函数 returns immutable frozenset object
Python 字符串方法
- Python String capitalize() 方法 Converts first character to Capital Letter
- Python String center() 方法 Pads string with specified character
- Python String casefold() 方法 converts to case folded strings
- Python String count() 方法 returns occurrences of substring in string
- Python String endswith() 方法 Checks if String Ends with the Specified Suffix
- Python String expandtabs() 方法 Replaces Tab character With Spaces
- Python String encode() 方法 returns encoded string of given string
- Python String find() 方法 Returns the index of first occurrence of substring
- Python String format() 方法 formats string into nicer output
- Python String index() 方法 Returns Index of Substring
- Python String isalnum() 方法 Checks Alphanumeric Character
- Python String isalpha() 方法 Checks if All Characters are Alphabets
- Python String isdecimal() 方法 Checks Decimal Characters
- Python String isdigit() 方法 Checks Digit Characters
- Python String isidentifier() 方法 Checks for Valid Identifier
- Python String islower() 方法 Checks if all Alphabets in a String are Lowercase
- Python String isnumeric() 方法 Checks Numeric Characters
- Python String isprintable() 方法 Checks Printable Character
- Python String isspace() 方法 Checks Whitespace Characters
- Python String istitle() 方法 Checks for Titlecased String
- Python String isupper() 方法 returns if all characters are uppercase characters
- Python 字符串 join() 方法 Returns a Concatenated String
- Python 字符串 ljust() 方法 returns left-justified string of given width
- Python 字符串 rjust() 方法 returns right-justified string of given width
- Python 字符串 lower() 方法 returns lowercased string
- Python 字符串 upper() 方法 returns uppercased string
- Python 字符串 swapcase() 方法 swap uppercase characters to lowercase; vice versa
- Python 字符串 lstrip() 方法 Removes Leading Characters
- Python 字符串 rstrip() 方法 Removes Trailing Characters
- Python 字符串 strip() 方法 Removes Both Leading and Trailing Characters
- Python 字符串 partition() 方法 Returns a Tuple
- Python 字符串 maketrans() 方法 returns a translation table
- Python 字符串 rpartition() 方法 Returns a Tuple
- Python 字符串 translate() 方法 returns mapped charactered string
- Python 字符串 replace() 方法 Replaces Substring Inside
- Python 字符串 rfind() 方法 Returns the Highest Index of Substring
- Python 字符串 rindex() 方法 Returns Highest Index of Substring
- Python 字符串 split() 方法 Splits String from Left
- Python 字符串 rsplit() 方法 Splits String From Right
- Python 字符串 splitlines() 方法 Splits String at Line Boundaries
- Python 字符串 startswith() 方法 Checks if String Starts with the Specified String
- Python 字符串 title() 方法 Returns a Title Cased String
- Python 字符串 zfill() 方法 Returns a Copy of The String Padded With Zeros
- Python 字符串 format_map() 方法 Formats the String Using Dictionary
Python 元组方法
- Python 元组 count() 方法 returns count of the element in the tuple
- Python 元组 index() 方法 returns the index of the element in the tuple