Welcome to the World of Python!
ANY FRIENDS WHO WANT TO LEARN CODING? Share This Newsletter With Them!
Learn to Code. Shape Your Future
ANY FRIENDS WHO WANT TO LEARN CODING? Share This Newsletter With Them!
A method is a functionality provided by the Python list data type that can be called by specifying the list followed by a dot and followed by the method you want to call. Some examples of methods supported by Python lists are append (adds an item to the end of a list), insert (adds an … Read more
This article will guide you through the process of generating a random UUID (Universally Unique Identifier) string using Python. What is a UUID? A UUID is a 128-bit number you can use to uniquely identify information in computer systems. The term “universally unique identifier” suggests that this ID is unique, which is nearly true, given … Read more
Do you want to know how to check if a list is empty in Python? You are in the right place. Here you will learn three simple ways to do that. To check if a Python list is empty you can use the len() built-in function that returns the number of elements in a list. … Read more
I’ve heard that Python has an operator called ternary operator but I don’t know how to use it. What does the ternary operator do? The Python ternary operator (or conditional expression) works on three operands and allows to write the logic of an if else statement in a single line of code. With the ternary … Read more
Strings in Python enable you to work with textual data, which is fundamental in every programming project, whether it’s for data analysis, web development, or automation. Think of strings as a collection of text characters, including letters, numbers, symbols, or spaces. Python strings are immutable, this means you cannot update individual characters in a string … Read more
I have written this article to help you understand how functions can make your life easier when writing a program in Python. The concept of function in Python is the same as in many other programming languages. Functions allow you to organize code in modular blocks and make code reusable. The more your Python code … Read more
To check if a list contains an item in Python, you can use the “in operator”. This operator returns True if the element exists in the list and False otherwise. An alternative is to use the list count() method. Note: The terms item and element of a list used in this article have the same meaning. … Read more
Imagine you are creating an application in which you have to track multiple users and each user has several properties (e.g. name, surname, and age). You could use a list of dictionaries as a data type to handle this requirement. You can represent the properties related to one user using the following dictionary: To track … Read more
To check if a domain is available you can call the whois command using Python and then parse the output returned by whois. This check can also be done using the nslookup or dig commands. The most common module to execute commands in Python is subprocess. Below you can see the syntax of the whois … Read more