zoukankan      html  css  js  c++  java
  • 列表方法

      
        def append(self, *args, **kwargs): # real signature unknown
            """ Append object to the end of the list. 
            在原来值后追加"""
            pass
    
        def clear(self, *args, **kwargs): # real signature unknown
            """ Remove all items from list. """
            pass
    
        def copy(self, *args, **kwargs): # real signature unknown
            """ 浅拷贝,用新变量接
            Return a shallow copy of the list. """
            pass
    
        def count(self, *args, **kwargs): # real signature unknown
            """ Return number of occurrences of value. """
            pass
    
        def extend(self, *args, **kwargs): # real signature unknown
            """可迭代对象,将每一个元素作为新元素加入列表中(字符串每个字符作为新的元素加入列表中) Extend list by appending elements from the iterable. """
            pass
    
        def index(self, *args, **kwargs): # real signature unknown
            """
            Return first index of value.
            
            Raises ValueError if the value is not present.
            """
            pass
    
        def insert(self, *args, **kwargs): # real signature unknown
            """ 
            Insert object before index. 
            在指定索引位置插入元素
            index(位置,元素)
            """
            pass
    
        def pop(self, *args, **kwargs): # real signature unknown
            """
           
            Remove and return item at index (default last).
            用新变量接被弹出的元素,默认是最后一个元素
            
            Raises IndexError if list is empty or index is out of range.
            """
            pass
    
        def remove(self, *args, **kwargs): # real signature unknown
            """
            Remove first occurrence of value.
            
            Raises ValueError if the value is not present.
            """
            pass
    
        def reverse(self, *args, **kwargs): # real signature unknown
            """ Reverse *IN PLACE*. """
            pass
    
        def sort(self, *args, **kwargs): # real signature unknown
            """
            Sort the list in ascending order and return None.
            
            The sort is in-place (i.e. the list itself is modified) and stable (i.e. the
            order of two equal elements is maintained).
            
            If a key function is given, apply it once to each list item and sort them,
            ascending or descending, according to their function values.
            
            The reverse flag can be set to sort in descending order.
            """
            pass                   
  • 相关阅读:
    洛谷P2798 爆弹虐场
    洛谷P1164 小A点菜(01背包求方案数)
    洛谷P1312 Mayan游戏
    洛谷P1514 引水入城
    2017-10-12 NOIP模拟赛
    洛谷P1038 神经网络
    洛谷P1607 [USACO09FEB]庙会班车Fair Shuttle
    洛谷P1378 油滴扩展
    Ionic+Angular实现中英国际化(附代码下载)
    Ionic+Angular+Express实现前后端交互使用HttpClient发送get请求数据并加载显示(附代码下载)
  • 原文地址:https://www.cnblogs.com/jiangzhch5/p/13246076.html
Copyright © 2011-2022 走看看