Home Coding & Scripting Getting Started with Python

Getting Started with Python

350
0

Are you curious about Python programming but don’t know where to start? Or maybe you’ve heard about its use in web development, data science, automation, or AI/ML and want to see why it’s such a powerful language?

You’re in the right place.


1. Why Learn Python?

Python is one of the most popular programming languages in the world — and for good reason:

  • Beginner-Friendly – Its syntax is simple and readable, making it easier to learn compared to other languages.
  • Versatile – Python is used in data science, automation, artificial intelligence, and even in web development.
  • Strong Community & Libraries – With thousands of libraries (numpy, pandas, django, flask, scikit-learn, FAST API), you can find a tool for almost any task.
  • In-Demand Skill – Python consistently ranks among the top skills employers look for, especially in data and AI-driven industries.

In short: Python is both a great first language for beginners and a powerful tool for professionals — from writing simple scripts to developing web applications, and driving fields like Artificial Intelligence, Machine Learning, Data Science, and Automation.


2. InstallING Python ON LOCAL Machine

Head to the official Python website and download the latest stable version.

  • Windows/Mac: The installer comes with pip (Python’s package manager). Make sure you tick “Add Python to PATH” during installation. Also select the “Use admin privileges…” option.
  • Linux: Most distributions include Python by default, but you can install or update it via your package manager.

To confirm installation, open a terminal or command prompt and type:

python --version

If you see a version number, Python is ready to go. 🎉

💡 Tip for working with projects

When you start working with projects, create a project folder first (e.g., PythonForAI) and then use “Open in Terminal” from that folder to start PowerShell in the right location if you have that option. If you do not have the “Open in Terminal” option use the cd command to navigate to that folder.

💡 Tip For Windows to Open PowerShell (or Command Prompt) Directly in Your Project Folder

  • In File Explorer, navigate to your project folder.
  • Right-click on the folder background (not on a file).
  • Choose “Open in Terminal” from the context menu.
  • A Terminal window opens directly at that folder path, ready for you to run Python or venv commands.

👉 By default, Windows Terminal opens PowerShell. If you prefer Command Prompt, switch tabs inside Terminal or change the default shell in settings.

🛠️ Common Issues Related to Installation

  • Issue 1: After installing Python on Windows and when you try to run python –version command, you may get an error similar to: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.
    • Solution 1: This happens because Windows has App Execution Aliases enabled for python.exe and python3.exe, which hijack the command. The fix is simple: go to Settings → Apps → Advanced app settings → App execution aliases, find python.exe and python3.exe, and turn them Off. After that, reopen Command Prompt or PowerShell and run python –version again — it should now display the correct version as long as python is added to path. You can also go to start > type Manage App Execution Aliases, disable App Installer for Python.
  • Issue 2: Python not added to path on Windows.
    • Solution 2: Make sure we select the option to add Python to path in the Python installer. After that, reopen Command Prompt or PowerShell and run python –version again — it should now display the correct version.
  • Issue 3: Installation fail with message installation is forbidden by system policy…
    • Solution 3: You are lacking admin privileges. Select the admin privileges option in python installer.

3. Write Your First Python Program ON PYTHON Prompt

From the terminal (or command prompt) from where you ran python –version successfully, type python (as shown in the next screenshot below) and press enter.

python

This will give you the python prompt with >>> symbol (as shown in the next screenshot below).

In the python prompt (>>>) type this:

print("Hello, World!")

Press enter — and you’ve just written your first Python program!

You can also run from Command Prompt (Windows), or Terminal (macOS/Linux) as follows: Type python and you will see a prompt with >>>. Execute the above python command.

💡 Tips to Remember

As you learn Python, keep these points in mind:

  • Case sensitive → Print is not the same as print.
  • Indentation (spacing) matters → Python uses spaces to define code blocks instead of {} like Java or C.
  • Error messages are your friends → Don’t ignore them; they usually tell you exactly what went wrong and where.

5. What’s Next?

Once you’ve nailed the basics, you can branch out into:

  • Learn Basics: Before tackling big projects, get comfortable with the core building blocks of Python:
  • Learn Intermediate Python – error handling, object-oriented programming, file I/O.
  • Learn Popular Libraries – numpy, pandas, matplotlib for data; flask or django for web.
  • Learn Automation – scripts that rename files, scrape websites, or send emails.
  • Learn Data Science & AI – using Python with Jupyter or Colab for experiments in machine learning.

Final Thoughts

Python is one of the most beginner-friendly languages, yet powerful enough for AI systems, web apps, and scientific research. Start with the basics, keep practicing, and build up step by step.

Your journey begins with that simple Hello, World! — everything else builds from there.


Bonus: Choose an Editor, IDE, or Notebook

You can technically write Python in any text editor, but an IDE (Integrated Development Environment) or a notebook environment makes coding much easier. We will learn about using most of these IDEs in later notes (blog post).

Here are some popular choices:

  • VS Code – Lightweight and customizable, great for beginners and professionals. Install the Python extension for debugging and autocomplete.
  • PyCharm – A powerful IDE made for Python, with features like advanced debugging, refactoring, and project management.
  • Jupyter Notebook – An interactive environment where you can write and run code in small chunks, add text and formulas, and display charts inline. Perfect for data science, learning, and experimentation.
  • Google Colab – A cloud-based version of Jupyter Notebook. Runs entirely in your browser, no installation needed. It comes preloaded with popular libraries and even gives free access to GPUs/TPUs for machine learning projects.

💡 Tip: If you don’t want to install anything yet, start with Google Colab. Later, when you’re ready for larger projects, explore VS Code or PyCharm.

Previous articleGetting Started with Terraform Workspaces for Managing Multiple Environments (Dev, Prod etc.)
Next articleVirtual Environment in Python and How to Set One Up
Heartin Kanikathottu
As a seasoned Cloud and Security Architect, I’ve led transformative initiatives in key roles, including Vice President at Morgan Stanley, Principal Architect at Societe Generale, and Tech Lead & Cloud Security Architect at VMware, among others. I’m also an internationally published author with multiple books available on platforms like Amazon and O'Reilly. Notably, one of my books was recognized as the 8th best cloud computing book of all time in 2020, reflecting the impact of my contributions to the field. With over 15 professional certifications from providers such as Microsoft (Azure), Amazon (AWS), Oracle (Java), Pivotal (Spring), and IBM, I bring a wealth of expertise to my work. Academically, I hold dual Master’s degrees in Cloud Computing and Data Analytics. I’m passionate about sharing knowledge and mentoring others, which is why I actively speak at global technical forums such as Tech Opportunities Fest at Platform Calgary, Google's Kubernetes Meetup, Java User Group, Elasticsearch Meetup, and the Agile India Conference.

LEAVE A REPLY

Please enter your comment!
Please enter your name here