Some commonly used data types and functions

Common data type
1, a digital
example: int int, float float, more precisely decimal Decimal, score Fraction
2, the string str
is arranged characters, for example: "Hello World"
. 3, list List
. 4, dictionary table dict
. 5, tuple tuple
. 6, the file file
. 7, set sET
. 8, Boolean Boolean: Ture, False
. 9, air: None
10, program unit: the function (function), module, type (class)
some of the functions
1, find the location: ID ();
2, whether the value is equal to:Such as ageScore;
. 3, the position of equality: Age Score IS;
. 4, introducing some of the modules: Import Math;
. 5, a randomly selected number: Random ();
. 6, the character indexes: number in square brackets [], a first position 0

Released eight original articles · won praise 0 · Views 145

Guess you like

Origin blog.csdn.net/DAN_L/article/details/104045641