ASCII (str) returns the ASCII code of the string, such as: The return value of select ASCII (' a ') is 97;
The first of the ORD (str) string str sentence is a single-byte return with the same value returned by the ASCII () function.For example:
SQL Server categories of built-in functions
function columns
Description
Aggregation functions
The action performed is to combine multiple values into a single value. For example , COUNT,SUM,MIN, and MAX.
Print(ABS (1))#absolute value, positive number is selfPrint(ABS (-1))#1Print(All ([A."1","']))#calculates whether the object in the iteration is true, one of which is false, and is displayed as falsePrint(All ("'))#If The iterable is empty, return
1. Yesterday's content reviewLen () Number of testsEval () removes the quotation marks from the string, returning the internal resultEval (' + + ')---> 2EXEC () Remove the quotation marks from the string and execute the internal codeRET = "If
1. All ([-1, 0, 1]) #判断是否全是不等于0的数2. Any ([ -1,0,1]) # has a number not 0 returns true any ([]) return False3.ascii ([1, 2, ' Open plug ']) #进行ascii conversion4.bin (1) #十进制转换为二进制5.bool (1) #判断是否为真6. A = bytes (' abcde ', encoding = ' utf-8 ') #abcde
Day3-python Basic 3 function, recursive, built-in function 1. Basic syntax and characteristics of functionsdefinition : Encapsulates a set of statements by a name (function name), which is called only when the function is executed. features :1.
Python has a number of functions built into it that can be called directlyABS () take absolute valueABS (-29)When calling a function, if the number of incoming arguments is incorrect, a typeerror error is reported, and Python will tell you
dir([object])----can take parameters or without parameters 1. Returns a list of the types of variables, methods, and definitions within the current scope when no arguments are taken.>>>dir ()[' __annotations__ ', ' __builtins__ ', ' __doc__ ', '
PackagingUse commas to split multiple values togetherEssentially, a tuple is returned, but the parentheses are omittedPython-specific syntax, learned and borrowed from many languagesDeconstructionTo untie the elements of a linear structure and
First, mathematics-related1, Absolute Value: ABS (-4)2, Maximum minimum: max ([456,789 123]), min ([[+])3. Sequence Length: Len (' abc '), Len ([+]), Len ((+))4, take the mold: Divmod (5,2)//(2,1)5. Powers: Pow (2,3,4)//2**3/46, floating point:
Built-in methods:1. ABS () #取绝对值;>>> ABS (-11)11>>> ABS (11)112. All #非0即真 to ensure that all elements are true;>>> all ([0,-5, 3])False>>> all ([1,-5, 3])True3. Any #非0即真 to ensure that an element is true;>>> any ([0,-5, 3])True>>> any ([1,-5,
Tuples and lists are similar, except that tuples are two times the list is processedLists: list, elements can be modified or addedli=[1,2,3,4,5]Tuples: tuple, non-modifiable, cannot be added or deleted, recommended for use where data is not allowed
Different objects have different implementations.1.Number objects:Syntax: numberobject.tostring ([radix])Parameters: Radix, optional/number type, specified cardinality (number of digits), support for integers between [2,36], default (default) is 10 (
Max (Arg1, arg2, *args[, key])This function is to iterate over the object iterable to find out the maximum value to return. When the key parameter is not empty, it is judged by the function object of key. Example:#max () Array1 = Range (Ten) Array2
Returns a new byte array.The ByteArray class is a variable sequence of range 0 It has common methods for most mutable sequences, described in variable sequence types, and methods for most byte types, see Byte and ByteArray operations.The optional
I. Lambda anonymous functionIn order to solve the simple needs of the design of the sentence function, some functions need to use function function, but not complex, in order to avoid the difficulty of the function name awkward, will use the
All (iterable)Official documentation explains:Return True If all elements of the iterable be True (or if the iterable is empty). Equivalent to:1 def All (iterable): 2 for inch iterable: 3 if not element: 4 return False 5
1. Divmod ()in python3.x version, the division operation with "//", the remainder can be used "%", in some problems to obtain both quotient and remainders need two-step operation, and The Divmod function can be used to obtain both quotient and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.