Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn Python Programming, 3rd edition - Third Edition

You're reading from  Learn Python Programming, 3rd edition - Third Edition

Product type Book
Published in Oct 2021
Publisher Packt
ISBN-13 9781801815093
Pages 554 pages
Edition 3rd Edition
Languages
Authors (2):
Fabrizio Romano Fabrizio Romano
Profile icon Fabrizio Romano
Heinrich Kruger Heinrich Kruger
Profile icon Heinrich Kruger
View More author details

Table of Contents (18) Chapters

Preface 1. A Gentle Introduction to Python 2. Built-In Data Types 3. Conditionals and Iteration 4. Functions, the Building Blocks of Code 5. Comprehensions and Generators 6. OOP, Decorators, and Iterators 7. Exceptions and Context Managers 8. Files and Data Persistence 9. Cryptography and Tokens 10. Testing 11. Debugging and Profiling 12. GUIs and Scripting 13. Data Science in Brief 14. Introduction to API Development 15. Packaging Python Applications 16. Other Books You May Enjoy
17. Index

Summary

In this chapter, we've explored the built-in data types of Python. We've seen how many there are and how much can be achieved just by using them in different combinations.

We've seen number types, sequences, sets, mappings, dates, times, and collections (and a special guest appearance by enumerations). We have also seen that everything is an object, learned the difference between mutable and immutable, and we've also learned about slicing and indexing.

We've presented the cases with simple examples, but there's much more that you can learn about this subject, so stick your nose into the official documentation and go exploring!

Most of all, we encourage you to try out all of the exercises by yourself—get your fingers using that code, build some muscle memory, and experiment, experiment, experiment. Learn what happens when you divide by zero, when you combine different number types into a single expression, and when you massage strings. Play with all data types. Exercise them, break them, discover all their methods, enjoy them, and learn them very, very well. If your foundation is not rock solid, how good can your code be? Data is the foundation for everything; data shapes what dances around it.

The more you progress with the book, the more likely it is that you will find some discrepancies or maybe a small typo here and there in our code (or yours). You will get an error message, something will break. That's wonderful! When you code, things break and you have to debug them, all the time, so consider errors as useful exercises to learn something new about the language you're using, and not as failures or problems. Errors will keep coming up, that's for sure, so you may as well start making your peace with them now.

The next chapter is about conditionals and iteration. We'll see how to actually put collections to use, and make decisions based on the data that we're presented with. We'll start to go a little faster now that your knowledge is building up, so make sure you're comfortable with the contents of this chapter before you move to the next one. Once more, have fun, explore, and break things—it's a very good way to learn.

You have been reading a chapter from
Learn Python Programming, 3rd edition - Third Edition
Published in: Oct 2021 Publisher: Packt ISBN-13: 9781801815093
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 $15.99/month. Cancel anytime}