Module 1: Why Astronomers and Astrologers See Things Differently: Planets and First Programming Steps
Hi Everyone,
Welcome to the first module of the multidisciplinary astrology course! It is the first step in the creation of an astrology course centered around building an astrology software program and dedicated to teaching astrology in a comprehensive, multi-disciplinary way. In this approach, as presented in the article Astrology Curriculum Design, astronomy, astrology, math, and programming are woven together in mutually supporting ways, providing a more holistic understanding of astrology as well as essential context for understanding the various programming tasks and projects we’ll be doing.
Since I'm developing this curriculum as I learn, the timing of future modules will depend on my own learning journey. For those who complete this module and are eager to continue learning without waiting, I've included a Resources section at the end sharing the programming and math resources I'm currently using. These are just a few of the many free resources available. If they aren’t right for you, feel free to explore alternatives on YouTube and elsewhere that better match your preferences and needs. If you have any questions about resources, please don’t hesitate to ask. I’ll gladly share what I know.
One thing I've been thinking about is the potential role of community in this work. As we each develop our own astrology software tools, there might be natural opportunities for sharing discoveries, exchanging ideas, and supporting each other's learning. Imagine, for example, a thriving community blog of some sort.
I've been particularly intrigued by platforms like Open Collective that provide new ways for people to collaborate. What caught my attention about Open Collective is that it provides infrastructure for contributors to potentially receive income for their work on shared projects in a way that empowers communities (and the individuals in them) rather than platforms.
While I'm still learning about how this works and don’t know yet if it’s the answer, it represents an interesting possibility for sustainable collaboration. I don't know what form of community, if any, might emerge from this work, but I wanted to share these thoughts as something to consider as we move forward with our individual journeys.
With these prelimaries covered, we can turn our attention to the content for this module. Let’s start with an overview of what we’ll be covering.
Module Overview
We’ll start the overview with the programming goal since that is the driver of what is taught in the other disciplines. The programming goal for this first module is to write planet lists and tuples in Python. What lists and tuples are will become clear in the Python section. To set us up to write them, we'll first explore planets and their classifications from both astronomical and astrological perspectives, then cover objects and sets in math. The material in these sections will set us up for our first steps into Python.
The astronomy, astrology, and math sections should be fairly easy to take in but are also crucially important. The astronomy and astrology sections set the baseline understanding of why some objects are called planets and others not. This understanding will help make sense of the difference between what astronomers call planets versus what astrologers call planets.
The math section introduces basic concepts that relate back to the material covered on planets and forward to the material covered in the programming section. Thus, this section serves as a bridge between the astrology and astronomy knowledge covered and the programming knowledge covered.
If you are new to programming and Python, the final section will take more time and focus. In part, it will require more attention because it will be your first encounter with a new language and culture with its own logic and rules. In part, it will be because you will be beginning your process of finding and getting to know new tools. And, in part, it will be because you will be beginning the process of honing your skills in writing the language. If you have any questions about anything covered in this or any other section, please don’t hesitate to ask.
Now let’s get started by looking at planets through an astronomy lens.
Section 1 | Astronomy: Planet Classification Through the Eyes of Astronomers
Contemporary Understanding
In our modern times, we make clear distinctions between different types of objects in the sky. We recognize the stars as one type of object, the planets as another type, the asteroids as another type, etc. We even distinguish between different kinds of planets - terrestrial planets (Mercury, Venus, Earth, and Mars), gas giants (Jupiter and Saturn), and ice giants (Uranus and Neptune).
Historical Understanding
In Hellenistic times (323 BCE to 31 BCE), when skywatchers looked up at the sky, they saw two types of objects and called both types stars. The first type were the stars that stay fixed in place, as though pinned to the fabric of the sky. These are the stars we recognize today as making up the constellations like Orion, Cassiopeia, and the Big Dipper. The second type were what we call planets. To their eyes, they were stars, too, but, unlike the fixed stars, they wandered through the sky. Their word for wanderer was panēt (plural: planētēs) and their word for star was astēr. Thus, they called these wandering stars astēr planētēs.1
Without telescopes, they were only able to see those planets visible to the naked eye, meaning the Sun, the Moon, Mercury, Venus, Mars, Jupiter, and Saturn. They didn't know yet that the Sun was the center of the solar system around which the other bodies orbited, though they did know that the Moon was a satellite of the Earth.2
Evolution of Understanding
Centuries later, after the telescope was invented in the 17th century, dedicated skywatchers began discovering new celestial bodies. Presumably with the realization that the Earth orbited the Sun, the Sun and Moon came to be seen as distinct from planets, though there was never a formal change in the definition.3 This unofficial shift differentiated astronomers from astrologers, with the latter maintaining the tradition of including the Sun and Moon in the planet category.
In time, with the aid of the telescope, more planets beyond the sight of our naked eye were discovered - first Uranus in 1781, then Neptune in 1846, then Pluto in 1930. Other bodies were also discovered and continue to be. A crisis came when objects beyond Pluto came into awareness that were more like it than the other planets. If Pluto was a planet, then they had to be, too. Did that make sense?4
In 2006, the International Astronomical Union (IAU) presented a set of parameters for determining what is and isn’t a planet, one that hadn't been used before and that reshaped the planet territory. The new definition, still in use today, is:
A celestial body that (a) is in orbit around the Sun, (b) has sufficient mass for its self-gravity to overcome rigid body forces so that it assumes a hydrostatic equilibrium (nearly round) shape, and (c) has cleared the neighbourhood around its orbit.5
That definition is not exactly user-friendly. According to the IAU, it can be summed up as follows:
a. [an object] orbits its host star, just as the Earth and Jupiter orbit the Sun,
b. is large enough to be mostly round, and
c. must have an important influence on the orbital stability of the other objects in its neighbourhood.6
That last one is still a little hard to understand. It essentially means that an object owns its orbit such that no other objects also travel in it.7
Pluto's inclusion as a planet hung on this third criterion. Those who advocated for it to be reclassified as a dwarf planet pointed out that it didn’t own its orbit, meaning that where it orbited, so did other objects. For it to be a full-fledged planet, that can’t be the situation.8 Not everyone agrees with this conclusion, but it is the accepted framing at this time.9
Personally, I feel it is useful to consider Pluto from both perspectives and appreciate the symbolic meaning that opens up when Pluto is classified as a dwarf planet. From that framing, we have a Universe where the Divine, as symbolized by Neptune, occupies the planetary perimeter while Pluto, symbolizing the ever-evolving soul, steps off into the deep dark beyond, perhaps preparing the way for Neptune’s infusion of love and compassion.
Whatever the settled answer ultimately becomes, we see from the history of classifying planets that one aspect of the work of astronomers is to organize discoveries into coherent groups that allow them to compare and contrast celestial obects and correlate data in meaningful ways. We also see that perception, perspective, and politics play a big role in how people decide to chunk things, which means that not everyone agrees with everyone else all the time.
With this context established, let’s look at one more astronomical way we might use to organize planets into groups - their orbital periods.
Orbital Periods and Planetary Order
The planets in our solar system take different amounts of time to orbit the Sun, creating a natural ordering from shortest to longest. In the table below, I show this natural ordering from our geocentric, or Earth-based, perspective, excluding the Earth itself. The orbital periods listed in the graphic are from NASA’s planetary fact sheet. The data given is in days. Because the orbital periods of planets further away from the Sun are very long, I have converted them to years and rounded up or down as appropriate.

This natural ordering will come into play in a future module when we start looking at aspects. For our purposes in this module, it is relevant to the next section on astrology where we’ll see how astrologers have used this order to organize planets into symbolically meaningful groups.
Section 2 | Astrology: Planet Classification Through the Eyes of Astrologers
Maintaining a throughline back to their hellenistic roots, contemporary astrologers continue the tradition of calling the Sun and Moon planets. Not all are aware of it, but every time we call the Sun and Moon planets, we are, in fact, drawing on that early perception and foundation of understanding. As for Pluto, many, perhaps most, astrologers today also continue to call Pluto a planet.
For other types of planetary objects, astrologers rely on the work of astronomers. Using astronomical findings and classifications, some astrologers have done incredible work discerning the symbolic meaning of these non-planet classes of objects. Yet, the planets continue to take center stage. The only question is which planets make up the core of an astrologer’s practice.
Broadly speaking, astrologers fall into one of two groups: traditional or modern. Traditional astrologers factor in the seven planets that early astrologers factored in, i.e., those they could see with their unaided eye. Those planets are: the Sun, the Moon, Mercury, Venus, Mars, Jupiter, and Saturn.
Modern astrologers have adapted their chart assessments to include the more recently discovered, or modern, planets beyond the naked eye - first Uranus, then Neptune, then Pluto - thus expanding the core repertoire of planets from seven to ten. Astrologers who practice modern astrology today continue to incorporate these three additional planets. Thus, the standard planets with which a modern astrologer works include the seven traditional planets plus the three modern ones.
Like astronomers, astrologers seek to organize planets into coherent groups that allow us to correlate data and discoveries in meaningful ways. Unlike astronomers, though, our categorizations are not aimed at understanding the physical properties of planets, but at discerning the meaning of their cyclic patterns and their relationships to earthly events and personal growth and experience.
One high-level way astrologers derive meaning is by organizing planets into groups based on their orbital periods, but with the addition of the Sun and Moon. This addition creates another layer of organization to the system based on brightness, with the Sun and Moon grouped together based on their striking brightness compared to the other planets.
Below is a graphic of the natural planetary groups that arise from the orbital periods of the planets and the luminosity of the Sun and Moon. As with the orbital periods for the astronomical planets and the dwarf planet Pluto, the orbital periods for the Sun and Moon are taken from NASA’s planetary fact sheet, with the Earth’s orbital period being used for the Sun and the Earth itself excluded from the list.

We can see from the graphic that if we were to rely on the Sun’s perceived orbital period of 365 days, it would be classed with the inner planets. But, because of its shared brightness with the Moon, it is taken out of the orbital flow and placed with the Moon. (If astrology included the Earth, it would fit nicely with the other inner, or terrestrial, planets.)
Astrologers, whose focus is on discerning the symbolic significance of cosmic realities, use these groups to sketch out high-level meaning for the planets. The Sun and Moon, for example, symbolize the two different dimensions of our inner light - the Sun our core vitality and expression and the Moon our inner emotional and egoic filters which shape or color our manifested vitality. Because of their shared brightness and prominence in the sky, they are called luminaries.
The inner or personal planets symbolize our day-to-day relational lives. I often call them the relational planets, with Mercury representing our communication, Venus representing relationships with self and other, and Mars representing our will and assertion.
The social planets symbolize the societal mores and social order into which we are born and the corresponding circles in which we travel (Jupiter) as well as the rules and structures that govern and sustain us and the roles and responsibilities we take up and fulfill within that structure (Saturn). I often call these planets the structural planets as they order, organize, and thus structure our society. Positioned beyond the inner planets, we can say that they serve as the larger construct in which our relational lives take place.
The outer or transpersonal planets symbolize deeper inner and collective forces of humanity, Soul, and Spirit that drive our evolution. I have started to call them attractor planets - forces that operate outside of our existing paradigms compelling ongoing, life-affirming, ultimately cohering change. Uranus represents the larger human collective. Neptune represents the unifying spiritual presence. And Pluto represents the deepening soul force. All are beyond Jupiter and Saturn and beyond our unaided sight, so we can think of them as the unseen forces that continually remodel our societal order and thus how we relate to ourselves and others.
Next, we’ll look at this idea of grouping and classifying through a mathematical lens and then see how we can incorporate it into a concrete programming task.
Section 3 | Math: Objects, Sets, and Classifications
Math is fundamentally a process of abstracting real-world objects and substituting them with symbols. Using symbols allows us to solve real-world problems in more efficient ways than would be possible if working directly with objects. If, for example, we have 20 pies and want to know how many pies we would have left if 15 ended up being eaten, we can physically take away 15 pies and count the number of pies left. But we can also use the symbols 20 and 15 and apply a substraction operation to get the same result. With this ability, we can do things like plan ahead, anticipate contigencies, balance our checkbook, etc.
Notice that in this example, we used counting, which also relies on symbols. One, for example, stands for one object, in this case a pie. One could also stand for a pie slice. Or it could stand for a balloon or a rabbit or anything else we want it to stand for. One is the abstraction we use to communicate the concept of a single object. Two is the abstraction we use to communicate the concept of two objects. Etc.
Presumably, math started with counting and advanced into more complex territory from there. At its root, then, all math is about counting - the act of abstracting and quantifying concrete objects. This act of counting underlies much of astrology. When we place a planet on a wheel, for example, we are essentially counting out how many degrees it has traveled from an agreed-upon starting point. When we say that x planet is in y sign, that is our shorthand for what is essentially an act of counting.
In the astronomy section, we talked about planets and the question of what constitutes a planet and what doesn’t. While not explicitly stated, the question of whether or not Pluto is a planet changed the number of objects called planets. Before the reclassification of planets, scientists recognized nine planets. This number includes Pluto and the Earth. After, they recognized eight. Today, the number of objects called planets continues to stand at eight.
In the astrology section, we also talked about the question of what constitutes a planet. That definition is different than the astronomical one used today and goes back to a shared definition used in Hellenistic times. In this Hellenistic definition, the Sun and Moon are considered planets and included in the count. Astrologers still use this definition today.
Many, and perhaps most, modern astrologers also continue to include Pluto despite the astronomical change in classification. Most astrologers, however, don’t factor in the Earth in their planet count because astrology is concerned with what we see from our perspective on Earth, not the Earth itself.
When we count up all the planets using the Hellenistic definition, which includes the Sun and Moon and the other visible planets, add the modern planets and exclude the Earth, we get a count of ten planets. Thus, modern astrologers say there are ten planets. Traditional astrologers say there are seven, those that are visible to our naked eye, including the Sun and Moon and excluding the Earth.
If we step back from counting and consider what planets are, we can think of them as a class of object. How many planets we include in this class will depend on how we slice the question of what a planet is. However we decide to slice it, we can call the planets included in the class or group a set. In math, a set is a collection of objects and the objects are called elements.
The objects, or elements, can be related to each other or not. In the case of planets, the objects are a collection of similarly classed items, though, as we have seen, different people may determine what constitutes a planet differently. The saying, You say potato, I say potahto comes to mind. Neither is wrong. The question is if the underlying rationale for the determination is coherent.
Let’s say we decide that the Sun, Moon, Mercury, Venus, Mars, Jupiter, and Saturn are all planets and that we’re not going to consider any of the newfangled ones that have been discovered since the telescope was introduced. That means we have a set of seven planets. Mathematically, we might use the letter p to stand for planet and write our set as follows:
p = {Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn}
We can think of this formulation as a mathematical sentence, though in math lingo, it’s called an equation. In this equation, p is a variable. In math, a variable is a letter that is used to represent something else. The equal sign tells us that p represents something specific. The celestial objects within the curly braces on the other side of the equal sign tell us that p stands for a set of objects in the sky. Since we’re astrologers, we’ll call it a set of planets.
Variables can also represent an unknown quantity. Thus, we might see something like
p = { }
In this statement, or equation, p still stands for what’s inside the curly braces, but now we don’t know what that something is. Given the many different ways to skin a planet, this equation is fitting. The variable p is some set of planets. As we build our astrology software program using Python, we’ll use these mathematical concepts to help us do so. One thing we’ll need to think about is how we’re going to define a planet. In other words, we’ll need to consider what we’re going to include in our set called p.
Python, however, implements things a little differently. As we go through these differences and the introductory ins and outs of Python in the next section, you will recognize the connections to math sets, but we need to introduce some Python-specific language and concepts, first. At this time, when it comes to grouping planets, I don’t know if there’s a best solution that works for all programming goals or if the best solution depends on our individual programming goals. But we’ll have some basic understanding and tools to get us thinking about the question.
Section 4 | Python: Collections
Housekeeping
To learn Python, you will need to set up what is called your development environment, or IDE. The “I” stands for Integrated. A development environment essentially means a computer or lap top and text editor where you can write and execute code. At the end of this section, I have included a video in which I recommend a few text editors for you to consider: vscode, sublime, and vim. There are more editors besides these but, from what I have learned so far, these are among the most highly esteemed and used by developers.
In the Resources section at the end of the article, I have included links to each recommended editor plus links to additional resources, both those mentioned in the video and additional ones not mentioned.
At this stage of the course iteration, a stage in which I am learning as I go, rather than showing you how to use these editors, something that I am not yet proficient enough in to do, I am recommending options and pointing you towards resources or places to find resources. In the future, when I have become more fluent in the programming side of things, I intend to include detailed tutorial walkthroughs on text editors and setting up your development environment.
For now, I recommend that you read through this section and then watch the video at the end to get you started in the right direction regarding setting up your development environment. This section is by far the most technical and there is a lot to take in. It is not difficult, but it is a lot and, if you don’t know anything about programming, it is a steeper learning curve than presented in the previous sections. Take your time. Ask questions. I’ll be happy to answer what I can. Look online for answers, too. It will come to you.
Introduction to Python Collections
In Python, sets are a type of collection. There are two types of collections: ordered and unordered. In this module, we’ll be looking at ordered collections. Before we delve into those, though, let’s start by looking at where collections fall within the Python language.
Python Language Basics
The Python language is made up of eight components, each serving as a foundation or building block for the next. These components are: 1) values; 2) variables; 3) expressions; 4) functions; 5) definitions; 6) classes; 7) statements; and 8) libraries.
Collections belong to the first component, values. Like components, collections are made up of foundational values. Thus, to understand collections, we need to understand what values are, so we’ll start there.
Values
Values are discrete pieces of information, or data types, that carry meaning. They are made up of one or more letters, words, numbers, special characters or, in some cases, nothing. Once values are defined, they can be used in other parts of the language. A good example is values being used together with variables. We’ll cover variables and how values are used with them below.
Examples of values include the word Hello, the phrase Hello World!, the number 3, or anything else you can think of that is made up of letters, words, numbers, special characters, and/or empty spaces.
We can group values into three types: basic values, collections, and special values. In this module, we’ll cover basic values and collections.
Basic Values
Basic values include strings and numbers. We’ll start with strings and then look briefly at numbers. We’ll go into more detail about numbers in a future module.
Strings
Strings are sequences of text - letters, words, numbers, special characters (symbols), or spaces - that are wrapped in double or single quotation marks. Sequences can include one or more characters. To distinguish them from numbers, we write them in double or single quotation marks.
Here are some examples written with double quotes:
“Hello World!”
“A = Apple”
“My name is Beatrice.”
“X”
“4 x 3 = 12”
Here are the same strings written with single quotes:
‘Hello World!’
‘A = Apple’
‘My name is Beatrice.’
‘X’
‘4 x 3 = 12’
The Two Keys to Strings: Immutability and Quotation Marks
Immutability
There are two keys to understanding strings. First, once they’re written, they cannot be changed. If I write “Hello World!”, I cannot later write code that changes “Hello World!” to something else, like “Hello friend!”. This feature of not being able to be changed is called immutability. In Python, strings are immutable. Later, when we look at collections, we’ll see that some are immutable and some are mutable, or able to be changed.
Quotation Marks
The second key to understanding strings in Python is that Python reads them as text, not values that can be operated on and/or solved. The quotation marks are crucial in making this distinction.
In the last example above, for example, we have the string ‘4 x 3 = 12’. While, to our eye, that’s an equation, to Python’s eye, because it’s wrapped in single quotes, it’s a sequence of characters without computational meaning. Thus, Python will output it as written, as shown in the video at the end of this sub-section on strings.
Regarding our main topic of planets, we can write each planet as a string. In the list below, I use double quotes, but you could also write each planet in single quotes:
“Sun”
“Moon”
“Mercury”
“Venus”
“Mars”
“Jupiter”
“Saturn”
“Uranus”
“Neptune”
“Pluto”
Finer Points of Quotation Marks
Being able to wrap strings in double or single quotes provides flexibility and adaptability for different situations. Let’s say we had a string that included an apostrophe, like this:
“It’s a beautiful day.”
Wrapped in double quotes as it is, Python recognizes the entire sentence as a string. But what if we wrapped it in single quotes, like this:
‘It’s a beautiful day.’
In this situation, Python would read the apostrophe in It’s as the closing quote. Seeing the text continuing after the closing quote, it would not know what we were intending and register an error.
Now let’s say we had a string that included a quote, like this:10
“Allegedly, Mark Twain once said, “The secret of getting ahead is getting started.””
In this situation, Python would read the opening quotation mark in Twain’s alleged quote as the closing quote for the string, as follows: “Allegedly, Mark Twain once said, “. Because the text continues after what Python sees as the closing quote, it would register an error.
We can resolve this issue in one of two ways. First, we can wrap the string in single quotes, like this:
‘Allegedly, Mark Twain once said, “The secret of getting ahead is getting started.”’
Or we can wrap the string in double quotes and Twain’s quote in single quotes:
“Allegedly, Mark Twain once said, ‘The secret of getting ahead is getting started.’”
Below is a video walkthrough of strings basics.
Reminder: To practice writing the code I show, you will need a REPL or a text editor. See the video embed in the Text Editor Recommendations section below for text editor recommendations and the Resources section for recommendations.
Numbers
Numbers represent quantities that can be calculated. If I write the number 2 in a Python editor, Python knows that it is a value that can be acted on by some operator, like +, -. If I write an expression such as 2 + 2, Python knows I want it to evaluate the expression and output the answer.11
We will look at numbers in more detail in a future module. For now, we’ve covered what we need to. Below is a short video going over what we’ve covered on numbers.
Reminder: To practice writing the code I show, you will need a REPL or a text editor. See the video embed in the Text Editor Recommendations section below for text editor recommendations and the Resources section for recommendations.
Variables
Before moving on to collections, it will be helpful to look at how we can use the second component type, variables, to name our values. We already saw variables used in the math section when we used p to equal a set of planets:
p = {Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn}
In this example, p acts as a label or container for the set of planets. Or we could say that it stands for the set of planets. Python uses the same concept. However, in Python, the convention is to use more descriptive variables so that the code is easier to read. Let’s start by looking at this implementation of variables using strings. We can, for example, use variables to name a simple string or number, such as “Mars” or 7. For the string, “Mars”, we could use the word planet instead of p as the variable, as follows:
planet = "Mars"
Or we might choose to add the descriptor fiery to our variable, such as:
fiery_planet = "Mars"
For the number 7, we might write:
number = 7
Or, if we were designating 7 as a house number, we could write:
house_7 = 7
Rules and Conventions
There are a few basic rules and conventions to keep in mind when writing variables. I have included a bullet list at the end of this section for quick reference, but here’s a more expansive run-through.
Rule 1: First Character
First, Python will only understand variables that start with an underscore or letter. If you start one with anything else, Python will give you an error message when you run your code.
Rule 2: Spaces
Second, Python will give you an error if you use spaces between words. The convention for avoiding that error is to use underscores. While you can use other options, the underscore is recommended.
Rule 3: Case Sensitivity
Third, variables are case sensitive, so planet with a small p is different than Planet with a capital P. If something isn’t working the way you expect, the case of a relevant variable might be something to check.
Rule 4: Keywords
Fourth, there are thirty-three keywords in Python that are reserved for specific purposes. When writing variables, you cannot use these keywords. You can see a list of them in the Python documentation. When you land on the linked page, scroll down to section 2.3.1: Keywords. I have also included a screenshot in the footnotes.12
Don’t worry about memorizing the keywords as you will get to know them over time and can always check the documentaton. Just know that they exist and might be something to check if you get an error when you run your code.
Rule 5: Constants
Finally, there is a convention to write constants, meaning something that doesn't change, in all caps. An example would be pi. We would write that as:
PI = 3.14
Summary of Variable Rules and Conventions
Here is a list summary of the rules, conventions, and recommendations for variables in Python:
start your variables with a letter or underscore
use underscores instead of spaces between words
remember that variables are case sensitive
do not use keywords
write constants in all caps
That covers all the rules for writing variables. If you follow them, you should be in good shape - Python will understand what you intend and other programmers will be able to easily read through and understand your code.
Collections
Now for the meat of the Python material for this module: collections. Like strings and numbers, they are values, but a step up in complexity.
In Python, the sets we looked at in the Math section are incorporated as a type of collection, with collections providing a way to group basic values in meaningful ways, including in sets. But sets are only one type of collection in Python. Items can be grouped in other ways, too. As mentioned at the start of this section, the different types of collections can be categorized into two basic types: ordered and unordered. Sets are one of the unordered collection types. We’ll look at those in a future module.
In this module, we’ll focus on ordered collections. Ordered collections are made up of strings or numbers. They can also be empty. They are called ordered because, once they’re written, they retain that order.
There are two types of ordered collections: lists and tuples. Lists, although made up of immutable strings or numbers, are themselves mutable. In other words, while numbers or the content of each string cannot be changed, the list as a whole can. Examples of how lists might be changed include adding or removing items from the list or changing the order.
Tuples, on the other hand, are immutable. That means that once they’ve been created, they can’t be changed. We can’t write code, in other words, to add or remove items or change their order.
This difference between lists and tuples and the question of mutability and immutability that underlies them will be worth considering when we write our astrology programs. When we group astrological items together, will we want to be able to change them later or have them stay as we originally wrote them? At this time, this question is one I’m walking with as I learn Python.
For now, we want to get clear on what each ordered collection type is and proficient at writing each in Python. To walk through how to do that, we’ll use the traditional planets. To write our planets as a list, we write each planet as a string, separate one from another using a comma, then enclose them all in square brackets, as follows:
["Sun", "Moon", "Mercury", "Venus", "Mars", "Jupiter", "Saturn"]
The square brackets let Python know we want this group of planets to be treated as a list - a mutable collection type that can be changed later in the program if we want to do that.
We write a tuple in a similar way, except we enclose the planets in parentheses instead of square brackets, as follows:
("Sun", "Moon", "Mercury", "Venus", "Mars", "Jupiter", "Saturn")
The parentheses let Python know we want this group of planets to be treated as a tuple - an immutable collection type that cannot be changed later in the program.
When writing a program, we’ll want to assign our lists and tuples to variables. Using our example of traditional planets, we can use traditional planets as our variable, as follows:
traditional_planets = ["Sun", "Moon", "Mercury", "Mars", "Jupiter", "Saturn"]
For a tuple of traditional planets, to assign it to a variable, we would do the same:
traditional_planets = ("Sun", "Moon", "Mercury", "Mars", "Jupiter", "Saturn")
Here is a video walkthrough of lists and tuples.
Reminder: To practice writing the code I show, you will need a REPL or a text editor. See the video embed in the Text Editor Recommendations section below for text editor recommendations and the Resources section for recommendations.
Assignments
To help groove your knowledge and ease with lists and tuples and to stimulate thinking relating to an astrology software program, I’ve included some questions, assignments, and a thought experiment that I hope will help you get the hang of writing lists and tuples in Python.
Thought Experiment
Imagine you are an astronomer who specializes in finding new planets and planetary bodies. If you write a program to keep track of your discoveries, you would want to use a list so that you can add to the original each time you make a new discovery. If you put your original findings in a tuple, you wouldn't be able to add new discoveries or add to or change that original list.
A similar scenario applies to astrologers wanting to write an astrology program. While the astrologer may not be the one finding the new discoveries, it seems reasonable that they may want to be able to update their program to accommodate new discoveries that are relevant to the astrology they want to practice. Thus, they may want to use a list rather than a tuple.
Questions to Walk With
Do you want to write a complete list of all the modern planets and then write code later on that changes the list to just the traditional planets or just the luminaries or just the outer planets, etc?
Do you want to write a list of just the traditional planets and then add the modern planets to it later?
Do you want to write tuples for each planet grouping: luminaries, inner planets, societal planets, and outer planets?
If you choose a single-list option, should you consider it a constant and thus use all caps for the variable name? If you choose a multiple-tuple option, should you consider each a constant and thus use all caps for the variable names?
These are all questions I am walking with and don’t yet know the answers. I suspect there is room for individual choice in making our decisions on these questions according to our astrology approaches and personal preferences.
Practice Exercises
Here are some suggestions for practicing lists and tuples, but feel free to be creative!
Write a list in Python of all the modern planets
Write a tuple of all the modern planets
Write a list for each planet group - luminaries, inner planets, societal planets, and outer planets
Write a tuple for each planet group - luminaries, inner planets, societal planets, and outer planets
Write all of the above as if they are constants
Write each list and tuple using a descriptive yet succinct variable that makes your code easy to read
First, though, in order to practice writing lists and tuples, you’ll need to choose a text editor. In the next section, I’ve included a video in which I recommend three text editors to consider and where to find them.
Text Editor Recommendations
In the video below, I recommend three text editor options and point to resources that can help you get started with them. I have included a Resources section beneath the Reference section with links to the text editors as well as additional resources that I didn’t cover in the video.
Suggested assignments and questions for consideration are beneath this video. [Correction: They are in the preceding section.]
References
Britt, Robert Roy. "Pluto Demoted: No Longer a Planet in Highly Controversial Definition." Space.com, August 24, 2006. https://www.space.com/2791-pluto-demoted-longer-planet-highly-controversial-definition.html.
Drake, Nadia. "In a Planet-or-Not Debate, Some Astronomers Say 'Long Live Planet Pluto.'" National Geographic, September 27, 2014. https://www.nationalgeographic.com/adventure/article/140926-pluto-planet-definition-science-debate.
International Astronomical Union. "Pluto and the Developing Landscape of Our Solar System." Accessed February 11, 2025. https://www.iau.org/public/themes/pluto/.
O'Toole, Garson. "The Secret of Getting Ahead Is Getting Started." Quote Investigator, February 3, 2018. https://quoteinvestigator.com/2018/02/03/start/.
Room: Space Journal of Asgardia. "IAU Wrong About Pluto's Planetary Status Say Scientists." Accessed February 11, 2025. https://room.eu.com/news/iau-wrong-about-plutos-planetary-status-say-scientists.
Shane. "About the Name Wandering Stars." Wandering Stars. Archived January 11, 2024. Accessed February 11, 2025. https://web.archive.org/web/20240111195236/https://www.wandering-stars.net/about-the-name-wandering-stars
Resources
Course Recommendations
Linux Tutorials
Learn Linux TV. Linux Commands for Beginners 01 - Introduction. YouTube. July 7, 2019.
tutoriaLinux. Linux Sysadmin Basics - Course Introduction (Updated for 2024). YouTube, March 14, 2014.
Math Tutorials
Professor Leonard. (2011, August 18). Prealgebra playlist 1. YouTube.
Python Tutorials
Curry, Caleb. (2020, May 7). Beginner Python tutorials. YouTube.
Erik. (2025, January 31). Python Tutorial. Python.Land. https://python.land/python-tutorial
Text Editor Tutorials
Sublime Text
LearnWebCode. Sublime Text Introduction (Tutorial #1). YouTube, November 26, 2014.
tutoriaLinux. Sublime Text Basics. All the Best Features in One Video. YouTube, May 7, 2017.
VS Code
Kevin Powell. How to Get Started with VS Code. YouTube, September 12, 2023.
Tech with Tim. VSCode Tutorial for Beginners - Getting Started with VSCode. YouTube, February 13, 2021.
Vim Tutorials
freeCodeCamp. Vim Tutorial for Beginners. YouTube, March 9, 2022.
Learn Linux TV. Vim Beginners Guide. YouTube, October 28, 2023.
REPLs
REPL means Read, Evaluate, Print, Loop. It is a code playground of sort that let’s you practice writing Python and see what it does. If you decide to use Linux, you should be able to access a Python REPL by typing python3 on the command line, as shown in the videos above. However, there are online options. I’ve included one below.
Documentation
Python Documentation (version 3.13.2). (n.d.). 2. Lexical Analysis: 2.3.1. Keywords. https://docs.python.org/3/reference/lexical_analysis.html#identifiers
Williams, Dr. David R. (2024, March 22). Planetary Fact Sheet - Metric. NASA. https://nssdc.gsfc.nasa.gov/planetary/factsheet/
Text Editors
For an online alternative that let’s you practice writing Python code, but not save files, try:
Notes
See Shane.
See Zielinski.
See International Astronomical Union
Ibid.
Ibid.
Ibid.
See Britt and Room: Space Journal of Asgardia.
See International Astronomical Union.
See International Astronomical Union, Room: Space Journal of Asgardia, and Britt.
For all uses of the alleged Mark Twain quote that follow in this section, see O’Toole.
For those of you who, like me, aren’t math geeks, 2 + 2 is called an expression, not an equation. For it to be an equation, there would need to be an equal sign and something on the other side, like so: 2 + 2 = 4. Something like this: 2 + 2 < 5, is also not an equation. It is an inequality. Inequalities include anything written with a <, >, or ≠, showing that the quantity on one side is different than the quantity on the other side.