Are you a programmer who wants to get started quickly in a new language? This book is for you.
Are you a novice who wants to learn to program? This book is not for you.
Are you a Python programmer who needs encyclopaedic information? This book is not for you.
Like any mainstream language, Python has loops, if statements, assignment statements, functions, etc. I’ll show you what these look like in Python. I won’t waste your time telling you what they’re good for.
Python has features you may not be familiar with--iterators, list comprehensions, maybe even dictionaries. I’ll spend more time on these.
I’ll cover some of the library functions I found most immediately useful, and tell you where to find more.
In short, this book will help you hit the ground running. Next week, you’ll be ready to buy that Python encyclopaedia.
Author(s): David Matuszek
Series: Quick Programming
Edition: 1
Publisher: CRC Press/Chapman & Hall
Year: 2023
Language: English
Commentary: Publisher's PDF
Pages: 128
City: Boca Raton, FL
Tags: Programming; GUI; Python; Object-Oriented Programming; Testing; Elementary
Cover
Half Title
Title Page
Copyright Page
Dedication
Contents
Author
Preface
Chapter 1. The Absolute Bare Minimum
1.1 Python and IDEs
1.2 IDLE
1.3 Variables
1.4 Important Data Types
1.5 Basic Arithmetic
1.6 Comparisons
1.7 Booleans
1.8 Lists
1.9 Strings
1.10 Comments
1.11 Statement Types
1.11.1 Assignment Statements
1.11.2 Print "Statements"
1.11.3 If Statements
1.11.4 While Loops
1.11.5 For Loops
1.11.6 Import Statements
1.12 Input from the User
1.13 Functions
1.14 Syntax
1.15 Order of Execution
1.16 Summary
1.17 Wait, That's It?
Chapter 2. Better Tools
2.1 Object Notation
2.2 Lists
2.3 Tuples
2.4 Sets
2.5 Dictionaries
2.6 String Methods
2.7 Loops for Objects
2.7.1 Looping over Lists
2.7.2 Looping over Sets
2.7.3 Looping over Dictionaries
2.8 Handing Exceptions
2.9 Type Conversions
2.10 Scope
2.11 File I/O
2.12 Pickling
Chapter 3. Classes
3.1 Classes and Inheritance
3.2 Constructors and Self
3.3 Subclasses
3.4 Printing Objects
3.5 Comparing Objects
3.6 Bindings
3.7 Shallow and Deep Copies
Chapter 4. Getting Fancy
4.1 Statements
4.2 Identifiers
4.3 Type Hints
4.4 Numbers
4.5 Strings
4.6 F-Strings
4.7 Bit Operations
4.8 List Comprehensions
4.9 Iterators
4.10 Generators
4.11 Parameters and Arguments
4.12 Functional Programming
Chapter 5. Testing
5.1 Philosophy
5.2 Doctest
5.3 Unit Testing
5.4 Unit Test Example
5.5 Test Suites
Chapter 6. Graphical User Interfaces
6.1 Dialogs
6.2 Tkinter
6.3 Creating Widgets
6.4 Putting Widgets into the GUI
6.5 Tkinter Example
Afterword
Appendix A. String Methods
Appendix B. Numerical Functions
Appendix C. Statistics
Appendix D. Functions on Iterables
Appendix E. Operating System Commands
Appendix F. Unit Test Methods
Index