Category Archives: Python

Is related to the Python Programming language in some way

Python 101: Learning About Lists

Lists are a fundamental data type in the Python programming language. A list is a mutable sequence that is typically a collection of homogeneous items. Mutable means that you can change a list after its creation. You will frequently see lists that contain other lists. These are known as nested lists. You will also see lists that contain all manner of other data types, such as dictionaries, tuples or objects.

Let’s find out how you can create a list!

Creating Lists

There are several ways to create a list. You may construct a list in any of the following ways:

  • Using a pair of square brackets with nothing inside creates an empty list: []
  • Using square brackets with comma-separated items: [1, 2, 3]
  • Using a list comprehension: [x for x in iterable]
  • Using the list() function: list(iterable)

An iterable is a sequence, a container that supports iteration or an iterator object. Lists themselves are sequences as are strings.

Let’s look at a few examples of creating a list so you can see it in action: Continue reading Python 101: Learning About Lists

PyDev of the Week: Tommy Falgout

This week we welcome Tommy Falgout (@lastcoolname) as our PyDev of the Week! Tommy works on the Robo-Clippy project. You can see what else he is up to by checking out his website. Let’s take a few moments to get to know Tommy better!

Can you tell us a little about yourself (hobbies, education, etc):

I grew up in the bayous of Louisiana, and while everyone else was interested in 4-wheeling and hunting, I gravitated towards computers and spent hours on my Commodore 64.  Early on, I knew what it meant to be an outcast.
As I matured, my hobbies became numerous and varied, but all focused around my passion of building.  For 5 years hosted and competed in Dallas/Fort Worth’s annual trebuchet competition: Slingfest, and was even featured on an episode of Dude Perfect on Nickelodeon as a Trebuchet expert (complete with my own IMDB page!).  I also volunteer at a local Makerspace in Plano, TX (, built a LEGO Robotic Clippy and competed in the Red Bull Soapbox Derby race.  After a few exciting near-misses from bodily harm, I’ve settled down and recently taken up crochet and hobby electronics.

Continue reading PyDev of the Week: Tommy Falgout

PyDev of the Week: Doug Farrell

This week we welcome Doug Farrell (@writeson) as our PyDev of the Week! Doug is working on Python book entitled The Well-Grounded Python Developer for Manning. He is also a contributor for Real Python. You can find out more about Doug on his website. Now let’s spend some time learning more about Doug!

Doug Farrell

Can you tell us a little about yourself (hobbies, education, etc.):

I’m a developer with a lot of other interests and have a varied background. After a couple passes through college, I graduated with an AS degree in commercial art in 1980, and a BS in Physics in 1983. Two clearly related fields. Part of why I graduated so late was having spent five years working at a bronze sculpture foundry. As fun as that was, it took me a while to realize the physical toll of working there wasn’t sustainable, and I went back to school. I guess I’m a slow learner.

During my last year of school, I bought a Tandy Color Computer and learned basic and a little 6809 assembler, and the programming hook was set in me. I’ve worked as a software developer in quite a few industries; process control, embedded systems, retail CDRom software, Internet reference titles, and web applications for production systems. I’ve also worked in several languages during that time; Pascal, Fortran, C/C++, Visual Basic, PHP, Python, and JavaScript.

My wife and are bicyclists and have ridden quite a few organized century rides. We’ve shortened our distances and ride more for enjoyment and fitness now, and of course, competing with each other. I also have gotten back into artistic pursuits and have started painting. This is challenging for me as I never did any creative painting work, or in a larger format. I know I tend to be a realist, but I’m trying to get more expressive fooling around with abstraction.

Susan and I have one daughter and son-in-law, and one grandson who just turned 3 and is fantastic! Continue reading PyDev of the Week: Doug Farrell

PyDev of the Week: Hameer Abbasi

This week we welcome Hameer Abbasi as our PyDev of the Week! Hameer works on the PyData Sparse project. You can check out what else Hameer is working on over on Github. Let’s take some time to get to know him better!

Can you tell us a little about yourself (hobbies, education, etc):

My hobby is, and has been for a while, scientific computing in general, the ecosystem and how to make it better. I’m lucky and grateful to have found a job in that same field, even though my formal education wasn’t in either Mathematics or Computer Science. Moving over to my education, I completed my Bachelors in Electrical (Telecommunications) Engineering from National University of Sciences and Technology, Pakistan in July 2014. After being a professional for a year at LMK Resources, Pakistan until September, 2015, I moved to Germany and completed my Masters in Information and Communication Engineering from Technische Universität Darmstadt (English: Technical University of Darmstadt) in October, 2015. I started with Quansight as a contractor then, and I’m continuing that to date. Continue reading PyDev of the Week: Hameer Abbasi

Python 101 2nd Edition Fully Funded + Stretch Goals

The second edition of my book, Python 101, has been successfully funded on Kickstarter. As is tradition, I have added a couple of stretch goals for adding more content to this already hefty book.

Python 101 2nd Ed Kickstarter

Here are the goals:

1) $5000 – Get 4 Bonus Chapters

These chapters would cover the following topics:

  • Assignment Expressions
  • How to Create a GUI
  • How to Create Graphs
  • How to Work with Images in Python

2) $7500 – Add Chapter Review Questions

The additional chapters are pretty exciting to me as they are fun things to do with Python while also being useful. The assignment expression chapter is also something that is new in Python and may be of use to you soon.

Adding chapter review questions was something I have always wanted to do with Python 101. Hopefully you will find that idea interesting as well.

If you are interested in getting the book or supporting this site, you can head over to Kickstarter now. There are some really good deals for some of my other books there too!

Python 101 2nd Edition Kickstarter is Live!

I am excited to announce that my newest book, Python 101, 2nd Edition is launching on Kickstarter today!

Python 101 2nd Ed Kickstarter
Click the Photo to Jump to Kickstarter

Python 101 holds a special place in my heart as it was the very first book I ever wrote. Frankly, I don’t think I would have even written a book if it weren’t for the readers of this blog who encouraged me to do so.

The new edition of Python 101 will be an entirely new, rewritten from scratch, book. While I will be covering most of the same things as in the original, I have reorganized the book a lot and I am adding all new content. I have also removed old content that is no longer relevant.

I hope you will join me by backing the book and giving me feedback as I write it so that I can put together a really great learning resource for you!

PyDev of the Week: Martin Fitzpatrick

This week we welcome Martin Fitzpatrick (@mfitzp) as our PyDev of the Week! Martin is the author of “Create Simple GUI Applications with Python and Qt 5” and the creator of the LearnPyQt website. You can also check out his personal site or see what he’s up to by visiting his Github profile. Let’s spend some time getting to know Martin better!

Martin Fitzpatrick

Can you tell us a little about yourself (hobbies, education, etc):

I’m a developer from the United Kingdom, who’s been working with Python for the past 12 years, and living in the Netherlands (Amersfoort) for the past 5.

I started coding on 8 bit machines back in the early 90s, creating platform games of dubious quality ” in my defence we didn’t have StackOverflow back then. Later I moved onto the PC, first writing DOS games and then, after someone invented the internet, doing a stint of web dev. I’ve been programming on and off ever since.

Rather than pursue software development as a career, I instead took a long detour into healthcare/biology. I worked first in the ambulance service, then as a physiotherapy assistant and finally completed a degree and PhD in Bioinformatics and Immunology. This last step was where I discovered Python, ultimately leading me to where I am now.

In my spare time I tinker in my workshop, creating daft electronic games and robots.

I like robots. Continue reading PyDev of the Week: Martin Fitzpatrick

The NSA Has a Beginner Python Course

The National Security Agency (NSA) recently released a free Python programming course for beginners after a Freedom of Information Act (FOIA) request according to ZDNet. There is almost 400 pages of material that has been uploaded to Digital Oceans Spaces by Chris Swenson, the software developer who made the original request.

You can access the course PDF directly here. Interestingly, the document mentions a couple of No Starch Press’s most popular books, such as “Automate the Boring Stuff with Python” and “Python Crash Course”.

The document is a bit dry, but it is interesting to see how the United States government is teaching Python.

Kushal Das has spent more time than I have digging through the materials and has posted about his discoveries on his blog. I personally found it interesting that they were using the Anaconda distribution rather than the CPython one.

Anyway, if you have some time, you should check it out.


Python 101 2nd Edition Kickstarter Preview

I have been kicking around the idea of updating my first book, Python 101, for over a year. After doing a lot of planning and outlining, I am ready to announce that I have started work on the book.

Python 101 2nd Ed Kickstarter

The new Python 101, 2nd Edition, will be a completely new book rather than just an updated book like a lot of publishers like to do. I feel like updating a chapter or two is a disservice to my readers. This new book will cover most of the items in the the original. However I am dropping the the tour of the standard library and replacing it with a “How-To” section as I think seeing live, working code is better than talking about syntax.

You can follow my Kickstarter now if you’d like to. The Kickstarter will go live February 17th at approx 8 a.m. CST and run 30 days.