human
What is a the Python code you requested given the following:
I am working on the file "06_Stack_Queue.ipynb".
The first task is:
Min Stack
Implement a stack with min() function, which will return the smallest number in the stack.
It should support push, pop and min operation all in O(1) cost.
http://www.lintcode.com/en/problem/min-stack/
https://leetcode.com/problems/min-stack/#/description
Can you write Python code for it?
assistant
#Here is the Python code you requested.

class MinStack(object):

    def __init__(self):
        # do some intialize if necessary
        self.stack = []

    def push(self, number):
        # write yout code here
        curMin = self.min()
        if curMin is None or number < curMin:
            curMin = number
        self.stack.append([number, curMin])

    def pop(self):
        # pop and return the top item in stack
        pop = self.stack.pop()
        return pop[0]

    def min(self):
        # return the minimum number in stack
        if len(self.stack) == 0:
            return None
        else:
            return self.stack[-1][1]