Merge offline data of Baidu audio and video with python 2.3 format update, python2.3
It has not been updated for a long time.
The resolution in four formats is supported.
Filelist
Slicelist
Download. cfg
Third_party_download.cfg
Or two files. Replace the previous version.
The preliminary test is normal, but the timeline is incorrect.
# -*- coding: UTF-8 -*-import osimport ioimport codecsimport stringimport
The following are the main methods of list merging:1, using the Extend method of list, L1.extend (L2), the method adds all the elements of the parameter L2 to the tail of L1 Results: [1, 2, 3, 4, 5, 1, 20, 30]2, with slicing (slice) operation, L1[len (L1): Len (L1)] = L2 and the above method equivalent Results: [1, 2, 3, 4, 5, 1, 20, 30]The slicing method is more flexible and can be inserted into the head, or any other part, for example:Add to start: Results: [10, 20, 30, 1, 2, 3, 4, 5]
1. Using the list's extend () method, the existing two lists are L1 and L2, respectively:1 >>> L1 = [1, 2, 3, 4, 5]2 >>> L2 = [, +]3 >> > l1.extend (L2)4 >>> L15 [1, 2, 3, 4, 5, 20, 30, 40]2. Using the slice (slice) operation, L1[len (L1): Len (L1)] = L2 is equivalent to the above method, for example:1 >>> L1 = [1, 2, 3, 4, 5]2 >>> L2 = [, +]3 >> > L1[len (L1): Len (L1)] = L245 >>> L16 [1, 2, 3, 4, 5, 20, 30, 40]The advantage of using a slicing method is that it is flexible and can be inserted a
" Connector characters ". Join (list or tuple or string or dictionary)Returns a string that is spliced with a connectorIf the object is a list, tuples are spliced in a subscript elementIf the object is a string, it is a word element that is spliced in unitsIf the object is a dictionary, it is stitched in a single key unitListIn [4]: a = ["123""123"]in ["". Join (a) In [6]: bout['123123'DictionaryIn []: a = {"fdasd":"adsf","afdasdf" :"asdf"}in ["". Join (a) in [+]: bout[ 'fdasdafdasdf'String" AS
1, add2, using the Extend method of the list, L1.extend (L2), the method adds all the elements of the parameter L2 to the tail of the L1, for example:3, with sectioning (Slice) operation, L1[len (L1): Len (L1)] = L2 and the above method equivalent,But the slicing method is more flexible and can be inserted into the head, or any other part, and can be added to the middle.How to merge two lists into a list in Python
See the other Department of the pen Test, found that the topic: two sequential arrays of the merger, so try to write in PythonSpecific as follows:if__name__== ' __main__ ': a=[2,4,6,8,9,10]b=[ 0,1,3,6,7,9,100,134]counta=countb=0# record where the two arrays were traversed c=[] foriinrange (Counta,len (a)): forjinrange (Countb,len (b)): print "B[j]:",j,b[j] if (B[j]This article is from "H2O's Operation Development Road" blog, reprint please contact the author!
[position] = current _valuedef Shell_sort (a_list): Sublist_count = Len (a_list)//2 while Sublist_count > 0:for start_position In range (Sublist_count): Gap_insertion_sort (A_list, start_position, sublist_count) print ("After Increme NTS of size ", Sublist_count," The list is ", a_list) Sublist_count = sublist_count//2def Gap_insertion_sort (a_list , start, GAP): For I in range (start + Gap, Len (a_list), gap): Current_value = a_list[i] Position = i While position >= Gap and A_list[posi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service