Description

Book Synopsis

Michael Hartl created the legendary Ruby on Rails Tutorial that helped jumpstart thousands of web development careers. A cofounder and principal author at Learn Enough, Hartl previously earned a Ph.D. in physics at the California Institute of Technology (Caltech), where he received a Lifetime Achievement Award for Excellence in Teaching. He is also an alumnus Harvard University and the world-renowned Y Combinator entrepreneur program.



Trade Review

"Just started the #100DaysOfCode journey. Today marks day 1. I have completed @mhartl's great Ruby tutorial at @LearnEnough and am looking forward to starting on Ruby on Rails from tomorrow. Onwards and upwards."
--Optimize Prime (@_optimize), Twitter post

"Ruby and Sinatra and Heroku, oh my! Almost done with this live web application. It may be a simple palindrome app, but it's also simply exciting! #100DaysOfCode #ruby @LearnEnough #ABC #AlwaysBeCoding #sinatra #heroku"
--Tonia Del Priore (@toninjaa), Twitter post; Software Engineer for a FinTech Startup for 3+ years

"I have nothing but fantastic things to say about @LearnEnough courses. I am just about finished with the #javascript course. I must say, the videos are mandatory because @mhartl will play the novice and share in the joy of having something you wrote actually work!"
--Claudia Vizena

"I must say, this Learn Enough series is a masterpiece of education. Thank you for this incredible work!"
--Michael King

"I want to thank you for the amazing job you have done with the tutorials. They are likely the best tutorials I have ever read."
--Pedro Iatzky



Table of Contents

Preface xiii
Acknowledgments xvii
About the Author xix

Chapter 1: Hello, World! 1
1.1 Introduction to Python 6
1.2 Python in a REPL 11
1.3 Python in a File 13
1.4 Python in a Shell Script 16
1.5 Python in a Web Browser 18

Chapter 2: Strings 35
2.1 String Basics 35
2.2 Concatenation and Interpolation 38
2.3 Printing 44
2.4 Length, Booleans, and Control Flow 46
2.5 Methods 56
2.6 String Iteration 62

Chapter 3: Lists 69
3.1 Splitting 69
3.2 List Access 71
3.3 List Slicing 74
3.4 More List Techniques 77
3.5 List Iteration 83
3.6 Tuples and Sets 86

Chapter 4: Other Native Objects 91
4.1 Math 91
4.2 Times and Datetimes 97
4.3 Regular Expressions 103
4.4 Dictionaries 109
4.5 Application: Unique Words 115

Chapter 5: Functions and Iterators 121
5.1 Function Definitions 121
5.2 Functions in a File 130
5.3 Iterators 138

Chapter 6: Functional Programming 149
6.1 List Comprehensions 150
6.2 List Comprehensions with Conditions 156
6.3 Dictionary Comprehensions 159
6.4 Generator and Set Comprehensions 163
6.5 Other Functional Techniques 165

Chapter 7: Objects and Classes 169
7.1 Defining Classes 169
7.2 Custom Iterators 176
7.3 Inheritance 179
7.4 Derived Classes 183

Chapter 8: Testing and Test-Driven Development 191
8.1 Package Setup 192
8.2 Initial Test Coverage 197
8.3 Red 209
8.4 Green 214
8.5 Refactor 220

Chapter 9: Shell Scripts 231
9.1 Reading from Files 231
9.2 Reading from URLs 240
9.3 DOM Manipulation at the Command Line 245

Chapter 10: A Live Web Application 255
10.1 Setup 256
10.2 Site Pages 263
10.3 Layouts 271
10.4 Template Engine 280
10.5 Palindrome Detector 293
10.6 Conclusion 316

Chapter 11: Data Science 319
11.1 Data Science Setup 320
11.2 Numerical Computations with NumPy 327
11.3 Data Visualization with Matplotlib 338
11.4 Introduction to Data Analysis with pandas 353
11.5 pandas Example: Nobel Laureates 361
11.6 pandas Example: Titanic 377
11.7 Machine Learning with scikit-learn 386
11.8 Further Resources and Conclusion 403

Index 405

Learn Enough Python to Be Dangerous

Product form

£26.99

Includes FREE delivery

RRP £29.99 – you save £3.00 (10%)

Order before 4pm tomorrow for delivery by Tue 13 Jan 2026.

A Paperback / softback by Michael Hartl

2 in stock


    View other formats and editions of Learn Enough Python to Be Dangerous by Michael Hartl

    Publisher: Pearson Education (US)
    Publication Date: 12/07/2023
    ISBN13: 9780138050955, 978-0138050955
    ISBN10: 138050953

    Description

    Book Synopsis

    Michael Hartl created the legendary Ruby on Rails Tutorial that helped jumpstart thousands of web development careers. A cofounder and principal author at Learn Enough, Hartl previously earned a Ph.D. in physics at the California Institute of Technology (Caltech), where he received a Lifetime Achievement Award for Excellence in Teaching. He is also an alumnus Harvard University and the world-renowned Y Combinator entrepreneur program.



    Trade Review

    "Just started the #100DaysOfCode journey. Today marks day 1. I have completed @mhartl's great Ruby tutorial at @LearnEnough and am looking forward to starting on Ruby on Rails from tomorrow. Onwards and upwards."
    --Optimize Prime (@_optimize), Twitter post

    "Ruby and Sinatra and Heroku, oh my! Almost done with this live web application. It may be a simple palindrome app, but it's also simply exciting! #100DaysOfCode #ruby @LearnEnough #ABC #AlwaysBeCoding #sinatra #heroku"
    --Tonia Del Priore (@toninjaa), Twitter post; Software Engineer for a FinTech Startup for 3+ years

    "I have nothing but fantastic things to say about @LearnEnough courses. I am just about finished with the #javascript course. I must say, the videos are mandatory because @mhartl will play the novice and share in the joy of having something you wrote actually work!"
    --Claudia Vizena

    "I must say, this Learn Enough series is a masterpiece of education. Thank you for this incredible work!"
    --Michael King

    "I want to thank you for the amazing job you have done with the tutorials. They are likely the best tutorials I have ever read."
    --Pedro Iatzky



    Table of Contents

    Preface xiii
    Acknowledgments xvii
    About the Author xix

    Chapter 1: Hello, World! 1
    1.1 Introduction to Python 6
    1.2 Python in a REPL 11
    1.3 Python in a File 13
    1.4 Python in a Shell Script 16
    1.5 Python in a Web Browser 18

    Chapter 2: Strings 35
    2.1 String Basics 35
    2.2 Concatenation and Interpolation 38
    2.3 Printing 44
    2.4 Length, Booleans, and Control Flow 46
    2.5 Methods 56
    2.6 String Iteration 62

    Chapter 3: Lists 69
    3.1 Splitting 69
    3.2 List Access 71
    3.3 List Slicing 74
    3.4 More List Techniques 77
    3.5 List Iteration 83
    3.6 Tuples and Sets 86

    Chapter 4: Other Native Objects 91
    4.1 Math 91
    4.2 Times and Datetimes 97
    4.3 Regular Expressions 103
    4.4 Dictionaries 109
    4.5 Application: Unique Words 115

    Chapter 5: Functions and Iterators 121
    5.1 Function Definitions 121
    5.2 Functions in a File 130
    5.3 Iterators 138

    Chapter 6: Functional Programming 149
    6.1 List Comprehensions 150
    6.2 List Comprehensions with Conditions 156
    6.3 Dictionary Comprehensions 159
    6.4 Generator and Set Comprehensions 163
    6.5 Other Functional Techniques 165

    Chapter 7: Objects and Classes 169
    7.1 Defining Classes 169
    7.2 Custom Iterators 176
    7.3 Inheritance 179
    7.4 Derived Classes 183

    Chapter 8: Testing and Test-Driven Development 191
    8.1 Package Setup 192
    8.2 Initial Test Coverage 197
    8.3 Red 209
    8.4 Green 214
    8.5 Refactor 220

    Chapter 9: Shell Scripts 231
    9.1 Reading from Files 231
    9.2 Reading from URLs 240
    9.3 DOM Manipulation at the Command Line 245

    Chapter 10: A Live Web Application 255
    10.1 Setup 256
    10.2 Site Pages 263
    10.3 Layouts 271
    10.4 Template Engine 280
    10.5 Palindrome Detector 293
    10.6 Conclusion 316

    Chapter 11: Data Science 319
    11.1 Data Science Setup 320
    11.2 Numerical Computations with NumPy 327
    11.3 Data Visualization with Matplotlib 338
    11.4 Introduction to Data Analysis with pandas 353
    11.5 pandas Example: Nobel Laureates 361
    11.6 pandas Example: Titanic 377
    11.7 Machine Learning with scikit-learn 386
    11.8 Further Resources and Conclusion 403

    Index 405

    Recently viewed products

    © 2026 Book Curl

      • American Express
      • Apple Pay
      • Diners Club
      • Discover
      • Google Pay
      • Maestro
      • Mastercard
      • PayPal
      • Shop Pay
      • Union Pay
      • Visa

      Login

      Forgot your password?

      Don't have an account yet?
      Create account