Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Expert Python Programming – Fourth Edition

You're reading from   Expert Python Programming – Fourth Edition Master Python by learning the best coding practices and advanced programming concepts

Arrow left icon
Product type Paperback
Published in May 2021
Publisher Packt
ISBN-13 9781801071109
Length 630 pages
Edition 4th Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Michał Jaworski Michał Jaworski
Author Profile Icon Michał Jaworski
Michał Jaworski
Tarek Ziade Tarek Ziade
Author Profile Icon Tarek Ziade
Tarek Ziade
Tarek Ziadé Tarek Ziadé
Author Profile Icon Tarek Ziadé
Tarek Ziadé
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Current Status of Python 2. Modern Python Development Environments 3. New Things in Python 4. Python in Comparison with Other Languages 5. Interfaces, Patterns, and Modularity FREE CHAPTER 6. Concurrency 7. Event-Driven Programming 8. Elements of Metaprogramming 9. Bridging Python with C and C++ 10. Testing and Quality Automation 11. Packaging and Distributing Python Code 12. Observing Application Behavior and Performance 13. Code Optimization 14. Other Books You May Enjoy
15. Index

Python in Comparison with Other Languages

Many programmers come to Python with prior experience of other programming languages. It happens often that they are already familiar with programming idioms of those languages and try to replicate them in Python. As every programming language is unique, bringing such foreign idioms often leads to overly verbose or suboptimal code.

The classic example of a foreign idiom that is often used by inexperienced programmers is iteration over lists. Someone that is familiar with arrays in the C language could write Python code similar to the following example:

for index in range(len(some_list)):
    print(some_list[index])

An experienced Pythonic programmer would most probably write:

for item in some_list:
    print(item)

Programming languages are often classified by paradigms that can be understood as cohesive sets of features supporting certain "styles of programming." Python is a multiparadigm language and thanks...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime