Introduction to Python 3

I am Developer, Artist and trying my luck on blogging as well. Well I am Ambitious, Passionate towards Learning, The Night Owl, And I Like challenges...
Search for a command to run...

I am Developer, Artist and trying my luck on blogging as well. Well I am Ambitious, Passionate towards Learning, The Night Owl, And I Like challenges...
No comments yet. Be the first to comment.
In this series you will get the fundamentals of python programming, and it will help you write a clean and effective scripts in future.
This topic covers Bird's-eye view of the language as a whole. We'll use examples to describe different elements of Python's syntax without getting into much detail about how each feature works. The idea is for you to become familiar with the syntax o...
Post #2 in the Complete Prompt Engineering Series Welcome back! In What is Prompt Engineering? A Complete Introduction, you learned what prompt engineering is and why it matters. Now we're going deeper: understanding the engine under the hood. You do...

Welcome to the future of human-AI collaboration. If you're reading this in 2024-2025, you're witnessing a fundamental shift in how humans interact with machines—and prompt engineering is your passport to this new world. The Definition: What Exactly I...
In this post, we’ll walk through the anatomy of a great prompt, illustrate every step with vivid examples, and even peek under the hood to see what happens technically when you hit “send.” By the end, you’ll be able to craft prompts that unlock the f...

What is GenAI and Why Does Prompting Matter? If you’ve ever wondered how people interact with AI tools, or why some folks seem to get exactly what they want from tools like ChatGPT while others receive confusing or generic responses, this article is ...

Let’s be honest—being a developer isn’t just about writing code. It’s about solving problems, dealing with burnout, handling meetings, chasing deadlines, and finding time to learn, debug, and ship. But in the middle of this chaos, one simple habit ca...

A thorough understanding of Python will help you write more efficient and effective scripts, so let's get started with Python's three essential training.
Python was created by Guido van Rossum during 1985- 1990.
Python is a general-purpose language which means it can be used for a wide variety of development tasks. Unlike a domain-specific language that can only be used for specific types of applications (think JavaScript and HTML/CSS for web development), a general-purpose language like Python can be used for:
Web applications: Popular frameworks like the Django web application and Flask are written in Python.
Desktop applications: The Dropbox client is written in Python.
Scientific and numeric computing: Python is the top choice for data science and machine learning.
Cybersecurity: Python is excellent for data analysis, writing system scripts that interact with an operating system, and communicating over network sockets.
Python is a high-level language which really just means that it’s simpler and more intuitive for a human to use. Low-level languages such as C/C++ require a much more detailed understanding of how a computer works. With a high-level language, many of these details are abstracted away to make your life easier.
For instance, say you have a list of three numbers — 1, 2, and 3 — and you want to append the number 4 to that list. In C, you have to worry about how the computer uses memory, understands different types of variables (i.e., an integer vs. a string), and keeps track of what you’re doing.
Implementing this in C code is rather complicated:
\\ Create list of three numbers 1,2 and 3
int *list=NULL;
int sizeList=3;
list= (int*) calloc(sizeList,sizeof(int));
if (NULL == list) { return -1 };
list[0] = 1;
list[1] = 2;
list[2] = 3;
\\ Append 4 to the list
sizeList += 1;
list = (int*) realloc(list, (size_t)(sizeList*sizeof(int)));
if (NULL == list) { return -1 };
list[3] = 4;
However, implementing this in Python code is much simpler:
# Create a list of three numbers 1,2 and 3
list1=[1,2,3]
# Append 4 to the list
list1.append(4)
Python is an Object-Oriented Programming (OOP) language which means that all of its elements are broken down into things called objects. A Python object is very useful for software architecture and often makes it simpler to write large, complicated applications.
Python uses dynamic semantics, meaning that its variables are dynamic objects. Essentially, it’s just another aspect of Python being a high-level language.
In the list example above, a low-level language like C requires you to statically define the type of a variable. So if you defined an integer x, set x = 3, and then set x = “pants”, the computer will get very confused. However, if you use Python to set x = 3, Python knows x is an integer. If you then set x = “pants”, Python knows that x is now a string.
In other words, Python lets you assign variables in a way that makes more sense to you than it does to the computer. It’s just another way that Python programming is intuitive.
It also gives you the ability to do something like creating a list where different elements have different types like the list [1, 2, “three”, “four”]. Defining that in a language like C would be a nightmare, but in Python, that’s all there is to it.
Python supports cross-platform operating systems which makes building applications with it all the more convenient. Some of the globally known applications such as YouTube, BitTorrent, DropBox, etc. use Python to achieve their functionality.
Python 3 is very close to Guido's ideal vision for Python. Code written for Python 2 must be ported for use with Python 3.