#Mastery08 #TC1014 @PablO_CVi
Types are a category for things within Python with which Python will work. Types are:
- integers
- Whole numbers from negative infinity to infinity, such as 1, 0, -5, etc.
- float
- Short for “floating point number,” any rational number, usually used with decimals such as 2.8 or 3.14159.
- strings
- A set of letters, numbers, or other characters.
- tuples
- A list with a fixed number of elements. ie x=(1,2,3) parentheses makes it a tuple.
- lists
- A list without a fixed number of elements. ie x=[1,2,3] note the square brackets, a list
- dictionaries
- A type with multiple elements i.e. x = {1: ‘a’,’b’: 2,3: 3} where you address the elements with, e.g., a text..
Taken from: http://en.wikiversity.org/wiki/Python/Basic_data_types
]]>