# import project #
import AboutFunction
list_3 = ['with', 'hope']
print("import project:")
AboutFunction.function_2(list_3)
# import function #
from AboutFunction import function_1
print("import function:")
function_1(list_3)
# change name #
from AboutFunction import function_1 as change # module 同理
print("change name:")
change(list_3)
# import all functions #
from AboutFunction import * # 与module的区别:only functions
print("import all functions:")
function_1(list_3)
from AboutClass import Dog, BorderCollie # import several classes //import
Samoyed = Dog("Happy", 2)
Samoyed.sleep()
from collections import OrderedDict
example_1 = OrderedDict() # print at the add order
example_1['first'] = 'hello'
example_1['forth'] = 'world'
example_1['second'] = 'the'
example_1['third'] = 'new'
for key, value in example_1.items():
print(key, value)