fgdfg 发表于 2018-8-6 10:30:07

range()——python2与python3不同之处

def range(start=None, stop=None, step=None): # known special case of range  
    """
  
    range(stop) -> list of integers
  
    range(start, stop[, step]) -> list of integers
  

  
    Return a list containing an arithmetic progression of integers.
  
    range(i, j) returns ; start (!) defaults to 0.
  
    When step is given, it specifies the increment (or decrement).
  
    For example, range(4) returns .The end point is omitted!
  
    These are exactly the valid indices for a list of 4 elements.
  
    """
  
    pass
页: [1]
查看完整版本: range()——python2与python3不同之处