Unit 2 - Basic Elements of Python

This unit looks at the basic elements of Python. It is really important that you get a good handle on these elements. That does not mean you have to memorise them, but you should understand them.

Programmers regularly switch languages and look up things. Your secret programming weapon is Google! You will find almost unlimited resources on Python, but knowing the right words to use in a search will certainly help you.

The lessons in this unit are:

  • Variables and Assignment
  • Statements vs Expressions
  • Numbers
  • Strings
  • Casting
  • String Indexing and Slicing
  • String Methods