COURSE SECTION 02 OF 06
Python Data Types
Lesson material assembled from the files you supplied.
Course notes
Content below is transcribed from the supplied course document. The original wording and terminology are retained.
§
Python Data Types
Python’s Core Data Types
List and Dictionaries can be nested
[ [ ‘1’ ] , [ 1 , 2 ] ]
{‘a’: { key : value } }
Numbers
+ Is addition, * is multiplication, ** is power or exponentiation(ex)
1.2+2.3=3.5
2 ** 2 = 4
len(str(2**2))
Strings
Order collection Data Types
‘acde’ - left-to-right sequences
Sequence Operation
Immutability Ordered Sequence
Type-Specific Methods
Getting Help
Other Ways to Code Strings
Unicode Strings
Pattern Matching
List
Mutable Ordered sequences
Sequence Operation
Type-Specific Methods
Bounding Checking
Nesting
List Comprehensions
Dictionaries
Mutable Mapping Data Types
Mutable Unordered sequences
Mapping Operations
Nesting Revisited
Missing Keys: if Tests
Sorting Keys: for Loops
Iteration and Optimization
Tuples
Immutable Ordered sequences
Why Tuples?
Files
excel
Immutability Ordered Sequence – String and Tuples
Mutable Ordered sequences – List
Mutable Unordered sequences - Dictionary
Download the supplied Python examples
Topics identified in the course materials
- Python's Core Data Types
- Numbers
- Strings
- Sequence Operations
- Immutability
- Type-Specific Methods
- Getting Help