python notes

find replace ctrl+r
comment ctrl+/
format code ctrl+alt+l

 

Common data types
Numerical types: int float is two of the more commonly used numeric types.
Bool type.
String type. 'vichin' "vicin" """vicin""" '''vicin'''
List type.
Set (collection)
Tuple (tuple)
Dictory (dictionary)
NoneType (empty type)

Convert the value to string str(123 )                        

Convert the value to char chr( 1 )

float('132.3')

string to int int('66')

Convert a number to the Unicode character unichr (x)

Convert x to the corresponding integer ord(x)

Convert x to a hexadecimal string hex(x)

Convert x to an octal string oct(x)

Evaluates a valid expression in a string and returns an object eval(str)

Convert the sequence s to a tuple(s)

Convert the sequence s to a list list(s)
data conversion

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324488247&siteId=291194637