1. List instance: Create a Job scoring list by string, make and delete to query statistic traversal operation. For example, query the first 3 points subscript, statistics 1 points of the number of students, 3 points of the number of students and so on.
>>> Can=list ('1123232323123')>>>can['1','1','2','3','2','3','2','3','2','3','1','2','3']>>> Can.append (4)>>>can['1','1','2','3','2','3','2','3','2','3','1','2','3', 4]>>> Can.insert (1,'5')>>>can['1','5','1','2','3','2','3','2','3','2','3','1','2','3', 4]>>> Can.pop (1)'5'>>>can['1','1','2','3','2','3','2','3','2','3','1','2','3', 4]>>> Can.index ('3')3>>> Can.count ('1')3>>> Can.count ('3')5
2. Dictionary: Establish the student's academic grade dictionary, do the deletion and change to check the traversal operation.
>>> dic=dict (Zip (['1','2','3'],[92,94,96]))>>>dic{'1': 92,'2': 94,'3': 96}>>> dic1={4:'98'}>>>dic.update (DIC1)>>>dic{'1': 92,'2': 94,'3': 96, 4:'98'}>>> Dic.pop (4)'98'>>>dic{'1': 92,'2': 94,'3': 96}>>> dic[4]=100>>>dic{'1': 92,'2': 94,'3': 96, 4:100}>>> Dic.get ('1')92
3 A list, a tuple, a dictionary, a collection of traversal. Summary lists, tuples, dictionaries, collections of connections and differences.
4 Examples of English word frequency statistics
A string to parse
b Decomposition to extract words
A Case txt.lower ()
B delimiter '.,:;?! -_
' C-Count dictionary
D Sort List.sort ()
E output Top (Ten)
Python 9.21 Jobs