When I started learning Python, I had almost no idea what I was looking at.
I would see things like variables, strings, integers, and input() and wonder why there were so many names for what seemed like simple things.
The more I practiced, the more I realised that the basics are actually pretty straightforward. The important part was understanding what each thing was doing rather than just memorising the syntax.
Here are some of the basics that finally started making sense to me.
Variables
The first thing I learnt was that variables are basically names used to store values.
For example:
Now I don't have to write those values again every time. I can just use the variable:

The way I started thinking about variables was like labels attached to information. Once that made sense, they became much easier.
Data types
Then I came across data types.
Python has different types of values, and the type matters because Python needs to know what kind of data it is working with.
For example:
name = "Feddy"
This is a string because it is text.
age = 20
This is an integer because it is a whole number.
price = 1500.50
This is a float because it has decimal places.
is_student = True
This is a boolean because it is either True or False.
I can also check the type of a value using:
print(type(age))
Strings
A string is simply text.
For example:
name = "Feddy Mwanjumwa"
I can combine strings:
This gives:
Feddy Mwanjumwa
I started noticing that strings are everywhere, especially when working with names, messages, and other text.
Integers and floats
Integers are whole numbers:
age = 20
quantity = 5
Floats are numbers with decimal values:
price = 250.50
For example:
The result is:
751.5
This made more sense once I started using numbers for realistic things like prices and quantities.
Input
One of the things that made Python feel more interactive was input().
Instead of giving the program all the information myself, I can allow the user to enter it.
For example:
name = input("Enter your name: ")
print("Hello", name)
Now the program waits for the user to enter a name.
I can also ask for a number:
age = int(input("Enter your age: "))
The int() is important here because input() gives me text by default.
That was something I had to learn through practice.
Output
For output, Python mainly uses print().
For example:
I can also use an f-string:
print(f"My name is {name} and I am {age} years old.")
I found f-strings much cleaner once I got used to them.
Basic Python syntax
Python syntax is basically the way Python expects me to write my instructions.
For example:
Python reads these instructions from top to bottom.
One thing I quickly noticed is that Python uses indentation to show blocks of code.
For example:
if age >= 18:
print("Adult")
The indentation is part of the syntax. It isn't just for making the code look neat.
A small practical example
Once I understood the basics, I could put them together into something more realistic.
For example, a simple shopping calculation:
The result would be:
This is where the different concepts started connecting for me.
I had a string for the product, numbers for the price and quantity, a variable storing the calculation, and print() displaying the result.
What I understood from the basics
The biggest thing I learnt is that Python isn't really about memorising a huge number of commands.
I started looking at it more like giving the computer instructions.
Store something in a variable.
name = "Feddy"
Ask the user for information.
age = int(input("Enter your age: "))
Do something with the information.
next_year = age + 1
Show the result.
print(next_year)
Once I started seeing Python this way, the basics became much less intimidating.
Final thoughts
These concepts may seem very basic now, but they were important for me because everything else in Python builds on them.
Variables, data types, input, output, and syntax were the first pieces I needed to understand before moving on to things like conditionals, loops, functions, and data structures.







Top comments (0)