Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

List Built-in Functions

A number of built-in functions create or deal with lists. The following functions apply to all sequences, including tuples and strings.

len( object ) → integer

Return the number of items of a sequence or mapping.

max( list ) → value

Return the largest item in the sequence.

min( list ) → value

Return the smallest item in the sequence.

any( tuple ) → boolean

Return True if there exists an item in the sequence which is True.

all( tuple ) → boolean

Return True if all items in the sequence are True.

range( [start] , stop , [step] ) → list of int

The arguments must be plain integers. If the step argument is omitted, it defaults to 1. If the start argument is omitted, it defaults to 0. The full form returns a list of plain integers [ start , start + step , start + 2 * step , ...]. If step is positive, the last element is the largest start + i * step less than stop ; if step is negative, the last element is the largest start + i * step greater than stop . step must not be zero (or else ValueError is raised).


 
 
  Published under the terms of the Open Publication License Design by Interspire