Some codes in python