2024-07-08
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
Inline comments
#
Make inline comments, such asx = 10 # 这是一个内联注释
。Multi-line comments
'''
or"""
pack.Fraction
fractions
The module provides a fraction type that can accurately represent fractional values.Decimal
decimal
The module provides a decimal type that can perform precise floating-point operations.Built-in help
help()
Function can be used to get help information for an object.Documentation Strings
"""
pack.Unused variables
_
As a placeholder for unused variables.The context manager protocol
__enter__
and__exit__
Objects whose methods can be used in context managers.Object __str__
method
__str__
A string representation of a method definition object, used forprint()
andstr()
。Object __repr__
method
__repr__
The official string representation of a method definition object, used for debugging and logging.String join
method
str.join()
Method can efficiently concatenate a list of strings.Set Operations
|
, intersection