Python Version: 2.7 We use python for rapid development. Mainly using the matrix operations, so we quickly introduce python collection type and control structure.
List 1 2 3 4 >>> wow=[] >>> wow.append(1) >>> wow.append('nice hat') >>> wow python has arryay data type, which similar to c/cpp/java/…, can contain only one type of data. This array type is faster than list when you are looping.
Dicthinaries 1 2 3 4 >>> wow={} >>> wow['name']='euryugasaki' >>> wow[123]=456 >>> wow Set 1 2 3 4 5 6 7 8 >>> Set1 = [1,2,3,4,5,6,7,8,9] >>> pSet1 = set(Set1) >>> pSet1 >>> pSet2 = set([4,5,6,7]) >>> pSet2 >>> pSet1-pSet2 >>> pSet1|pSet2 >>> pSet1&pSet2 if 1 2 3 4 5 >>> val=10 >>> if val<9: print "hehe" >>> if val<9: .