Python For Rubyists
If you are familiar with any one of the programming language this article will help you to jump directly to Python code.
Though the article’s title states it’s for rubyists, actually it is for everyone who is familiar with a programming language.
All the code examples are based on python3.
Python code blocks are indented.
Setting up environment
ruby tool python equivalent
gem install <gem> is
pip install <package>
Python has 2 types of data structures immutable and mutable. Immutable can be changed. Mutable once defined cannot be changed.
4 data structures
- String (immutable)
- List (mutable)
- Dictionary (mutable)
- Tuple (immutable)
The classic example of object oriented programming.