01 January 2018

"Learning Python by Mark Lutz" - Reading Journal 3 [Chapter 4 and Chapter 5]

Learning Python by Mark Lutz Fifth Edition
Learning Python by Mark Lutz
Like me, if you are new to Python and want to ramp-up to become no non-sense developer in Python, you might want to read these posts (and if you are prepared to take up the tough path of mastering the language). The post like this is my experience - the journey that is little longer but interesting, thought-provoking and rewarding. 

For next few months, I would be posting my experiences with Python more specifically the learning I am going through from the book - "Learning Python by Mark Lutz". You can find all of my reading journal of this book

The rest of this post covers what I learned in Chapter 4 and Chapter 5.

Chapter 4: Introducing Python Object Types
As the chapter title says, this chapter introduces core data types that are built-in to Python - Numeric, String, Lists, Dictionaries. It also gives an overview of Files, Set, and user-defined classes. It talks about sequences, mappings, and sets. How to iterate over collections and access mappings/dictionaries. What are type-specific functions available. On files, a simple read/write with encoding/decoding is discussed at a higher level. At the end of this chapter, you will realize that everything is object in Python (and dynamic/strick typing system). It was very interesting to read. On the downside, I am still curious as to when I will write some code. I do not see coding exercises/puzzles at the end of the chapter yet.

Chapter 5: Numeric Types
What we think as just integers and floats are mind-boggling when we try to go little deeper. This chapter is no exception especially when you have two versions of Python (2.x and 3.x) behave little differently. I am pretty sure that numeric types and differences in two major versions of Python are going to be little tough to remember and one has to keep referring the material until it becomes second nature. Let us come to the learning.

This chapter covers numeric types - integers, floats, decimal, fraction, complex numbers, operators, building expressions, precedence, bitwise operators, comprehension, sets, booleans, evaluation of tests, chained tests, representing numbers in other bases (hex, octal and binary) and finally some introduction on number crunching with popular modules. I strongly suggest practicing while you read to get the feel of what the author says. The chapter was longer with so many details but never boring though. Truly great stuff.

All posts related to "Learning Python by Mark Lutz"

Friendly Note: I am posting the images and links from the publisher's website. I am not an affiliate and I do not get paid for writing this. If my journal is useful for someone to learn Python, I am more than happy :-)