Learn how to code with Python - Lesson 5 - Basics wrapup

Basic code wrapup
Basic code?
In this lesson I bring together the few basics discussed in the previous videos and this video. To do this I will discuss one more important principle in programming and that is:

Datatypes

I have already introduced some datatypes like strings, integers and floats. But there are more types you need to know about before we can continue.



Lists

A built-in Python sequence. Despite its name it is more akin to an array in other languages than to a linked list since access to elements are O(1).
https://docs.python.org/3.1/glossary.html#term-list

Dicts

An associative array, where arbitrary keys are mapped to values. The keys can be any object with __hash__() function and __eq__() methods. Called a hash in Perl.
https://docs.python.org/3.1/glossary.html#term-dictionary

Tuples

tuple is an immutable sequence type, as documented in Sequence Types — str, bytes, bytearray, list, tuple, range.

https://docs.python.org/3.1/library/functions.html#tuple


Comments