Skip to content

posi2/Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python

Python is a programming language that lets you work quickly and integrate systems more effectively.

List

List is a collection which is ordered and changeable. Allows duplicate members.

Dictionary

A dictionary is used to map or associate things you want to store the keys you need to get them. A dictionary in Python is just like a dictionary in the real world. Python Dictionary are defined into two elements Keys and Values. Keys will be a single element. Values can be a list or list within a list, numbers, etc.

  • More than one entry per key is not allowed ( no duplicate key is allowed)
  • The values in the dictionary can be of any type while the keys must be immutable like numbers, tuples or strings.
  • Dictionary keys are case sensitive- Same key name but with the different case are treated as different keys in Python dictionaries.

Tuple

A Tuple is a collection of Python objects separated by commas. In someways a tuple is similar to a list in terms of indexing, nested objects and repetition but a tuple is immutable unlike lists which are mutable.

all()     	Return True if all elements of the tuple are true (or if the tuple is empty).
any() 	    Return True if any element of the tuple is true. If the tuple is empty, return False.
enumerate() Return an enumerate object. It contains the index and value of all the items of tuple as pairs.
len()     	Return the length (the number of items) in the tuple.
max()     	Return the largest item in the tuple.
min()     	Return the smallest item in the tuple
sorted()   	Take elements in the tuple and return a new sorted list (does not sort the tuple itself).
sum() 	    Return the sum of all elements in the tuple.
tuple()   	Convert an iterable (list, string, set, dictionary) to a tuple.

About

Parabole

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages