Day1:
Input and OUTPUT statements: input, print
Control statements: If, else, elif ...
Loop statement: for (similar to foreach inside C #), while ...
Type (), Isinstance () ...
Data type:
int, float, bool, str ... '
operator
**, //,
...
List: A hormone-hit array
P.S. You can add any element, regardless of type
Method
Append () |
#add a new value in the end of the list |
Pop () |
#remove the top member of the list, this method would return this member as well. (The same as the method in stack) |
Remove () |
|
Del |
|
List_name[number:number] |
|
< > ... |
Operator for List |
Inch |
For some instance to confirm if it is contained |
Dir (list) ..... |
|
p.s.----Dir (list)
>>> dir (list)
[' __add__ ', ' __class__ ', ' __contains__ ', ' __delattr__ ', ' __delitem__ ', ' __delslice__ ', ' __doc__ ', ' __eq__ ', ' __format_ ' _ ', ' __ge__ ', ' __getattribute__ ', ' __getitem__ ', ' __getslice__ ', ' __gt__ ', ' __hash__ ', ' __iadd__ ', ' __imul__ ', ' __init_ _ ', ' __iter__ ', ' __le__ ', ' __len__ ', ' __lt__ ', ' __mul__ ', ' __ne__ ', ' __new__ ', ' __reduce__ ', ' __reduce_ex__ ', ' __repr__ ' , ' __reversed__ ', ' __rmul__ ', ' __setattr__ ', ' __setitem__ ', ' __setslice__ ', ' __sizeof__ ', ' __str__ ', ' __subclasshook__ ' ', ' append ', ' count ', ' extend ', ' index ', ' Insert ', ' pop ', ' remove ', ' reverse ', ' sort ']
Python learning Diary [1]