07 January 2018

"Learning Python by Mark Lutz" - Reading Journal 6 [Chapter 10, Chapter 11 and Chapter 12]

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 10, Chapter 11 and Chapter 12.

Chapter 10: Introducing Python Statements
This chapter is fairly easy to read. By now you should have written some code with statements which should make this chapter even more easier. But an important take away is "why Python is Pythonic" with to respect statements, code blocks, and indentation. Towards the end, we also see few nice and quick examples.

Chapter 11: Assignments, Expressions, and Prints
This is another great chapter that covers assignments, expressions, and prints in great detail. It details various ways of assignments, sequence unpacking, sequence assignments and augmented assignments. Variable naming rules, conventions, and expression statements are discussed too. Towards the end, there is a good section on prints and various ways of printing covering both 2.x, 3.x, and printing in version neutral way. Another great chapter.

Chapter 12: if Tests and Syntax Rules
This chapter gives an in-depth treatment of if constructs & its optional extension (elif, else) giving examples of nested and deeply nested if constructs, multiway branching. The most valuable content is the discussion on indentation and philosophy of Python with respect to code readability in the light of software maintenance. Truth values, boolean tests and if/else ternary operations are discussed. I suggest to stop here for a while and then try out examples so that the concepts are understood well.

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 :-)