python iterable and iterator

An object is called an iterable object if it has an __iter__ method. List, tuple, dict are all iterable objects[reference]: The __iter__ method returns an iterator object. An object is […]

How to run jupyter?

If you are learning machine learning on your computer. The first thing would be running the jupyter app to do some hands-on. Running this program is not similar to running […]

In python, you have many ways to represent a 2-dimensional array. You can use list like:[[1,2],[3,4],[5,6]], you can use ndarray in numpy like:numpy.array([[1,2],[3,4],[5,6]]), you can also use dataframe in the […]

If you learn python based AI software such as tensorflow, you’ll inevitably meet the package Numpy and DataFrame,etc. So you must learn how to use Numpy and DataFrame before you […]

Python indent seems an easy syntax. If you use the same number of spaces/tabs(don’t mix spaces and tabs) for code lines in the same block, you’ll have no problem. That […]

requests library is a powerful python package for http. You can use it to fetch web pages, and do anything as the http verbs can do. To use requests, install […]

import can be used independently: import module import package It can be used to import a module, a package, or . concated module/packages. import package.module import package1.package2 import package1.package2.module But […]