Basic data type:
Digital
String
Boolean value
List
Ganso
Dictionary
All objects have functions that are stored in the appropriate class.
View the class of an object, or the functionality that an object has.
1. View by Type ()
temp = "Alex"
t = Type (temp)
2. Overall view dir () quick list
temp = "Alex"
t = Type (temp)
Print (dir (t))
3. View a certain type of function
temp = "Alex"
t = Type (temp)
Help (Type (t))
4. Mouse click
temp = "Alex"
Temp.upper ()
Mouse on Upper (), ctr+ left button, auto-position to upper function
common features for basic data types:
integer int
N1 = 123
N2 = 456
Print (N1+N2)
Print (n1.__add__ (n2))
A1 = "Alex"
ret = A1.capitalize ()
Print (ret)
A1 = "Alex"
ret = A1.center (20, ' * ')
Print (ret)
A1 = "Alex is Alph"
ret = A1.count ("a")
Print (ret)
A1 = "Alex is Alph"
ret = A1.count ("Al", 0,10)
Print (ret)
temp = "Hello"
Print (Temp.endswith (' e ', 0,2))
Content = "hello\t999"
Print (content)
Print (Content.expandtabs ())
Print (Content.expandtabs (20))
s = "Alex Hello"
Print (S.find ("ex"))
s = "Hello {0}, Age{1}"
Print (s)
New1 = S.format (' Alex ', 19)
Print (New1)
Python Basic data type