Python often forgets code query prerequisites!!!!!!!!

Source: Internet
Author: User

  

#集合b=Set()" "1. Add Action Add2. Delete operation (Remove,discard,pop)3. Empty (Clear)4. Intersection &, and set |, difference set-, symmetric difference ^, subset (included) <=, parent set (inclusive) >=" "#队列import Queue" "A=queue. Queue () Queue.qsize () returns the size of Queue.empty () if the queue is empty, returns true if the queue is full, and returns True if the queues are filled, and vice versa falsequeue.full with the Falsequeue.full MaxSize size corresponds to Queue.put (item) write queue, timeout wait time" "#双端队列 fromCollections Import Deque" "1. A=deque ([]) #创建一个空的双队列2. A.append (n) #从右边像队列中增加元素, n indicates the added element3. A.appendleft (n) #从左边像队列中增加元素, n indicates the added element4. A.clear () #清空队列5. A.count (n) #在队列中统计元素的个数, n represents the element of the statistic6. A.extend (n) #从右边扩展队列, n represents the extended queue7. A.extendleft (n) #从左边扩展队列, n represents the extended queue8. A.pop () #从队列的右边删除元素 and returns the delete value9. A.popleft () #从队列的左边删除元素 and returns the delete valueTen. A.remove (n) #从队列中删除指定的值 One. A.reverse () #翻转队列 A. A.rotate (n) #旋转队列, the default value is 1, rotation starts from the right, negative values are rotated on the left, n means starting from the first element of the queue, and n counting from 1" "

Python often forgets code query prerequisites!!!!!!!!

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.