Language Selection

English French German Italian Portuguese Spanish

Python Leftovers

Filed under
Development
  • Python Queue – Linux Hint

    Python provides many built-in modules, functions, and statements that help the programmers to perform various complicated tasks easily. It also provides many built-in data structures like lists, tuple, and dictionaries, which ensure the efficient creation and management of data in applications. A queue is a data structure that stores and manages the data. It stores the data in a first-in, first-out (FIFO) order. The element that is inserted first will be removed first. We can understand the working of the queue from our daily life example. It‘s like a queue of customers; the customer who comes first is facilitated first.

  • Python Multi-line Comments – Linux Hint

    Every programming language provides a mechanism to add comments to projects. Comments are the simple lines in computer programs that are ignored by the compiler or interpreter. Comments are often written in natural language to increase programmer comprehensibility. Developers use comments to ignore some parts of the code in the debugging or testing phase.

    Writing comments in Python can be very simple, and creating a comment in Python begins with the ‘#’ symbol. This article explains how to create multi-line comments in Python.

  • How to Join Lists in Python – Linux Hint

    Lists are an important data structure in Python, used to store multiple elements in a single container. Python lists can store both similar types and heterogeneous types of elements. In Python, you can join or concatenate two or more lists. Joining a list merges numerous lists into a single list. This article explains the joining or concatenation of Python lists in several ways.

  • Python Zip File – Linux Hint

    Python is a general-purpose programming language. It is widely used in machine learning, deep learning, artificial intelligence, and data sciences projects. Python is loaded with handy built-in modules, functions, and statements. Therefore, it helps the programmers a lot to perform many types of tasks. Performing the file related task in Python is super easy due to the availability of related modules. We can perform any type of file-related tasks, i.e., reading, writing, searching, and deleting a file.

    ZIP is a popular format of files that offers lossless compression. A ZIP file contains one or many compressed files and is a single file. The compression algorithms ensure that we can recreate the actual data from the compressed data without any loss. There are several benefits of using the zip file. By using the zip files, we can put all the related data in one single file with reduced file size. Encryption can also be applied while creating zip files. ZIP files are mostly created and used when we need to transfer data through online sources like social media applications and email. It ensures the fastest delivery of data. Python provides a built-in zipfile module to work on the ZIP files. In this guide, we will learn to perform various zip file-related tasks with examples.

  • Python Global Variables – Linux Hint

    In programming language, variables are used to store information. For example, in developing a student management software system, the name, email, and age of a student will be stored in the respective variables. Like other programming languages, Python has both global and local variables. In Python, global variables are declared outside of the function and can be used everywhere in the program. This article explains global variables in Python in detail with some examples.

    The scope of the global variable is very wide, and it is not limited to any specific function. These variables can be used both inside and outside of the function for storing and retrieving information.

  • Python getattr( ) Function – Linux Hint

    The vast variety of Python built-in modules, functions, and statements helps programmers to perform various tasks. The getattr() function is a Python built-in function that allows programmers to access the attribute value of an object. If the value is not found, then the getattar() function returns the default value. This is the reason why the getattr() function is used mostly to access the attribute values of objects. This article will provide a detailed explanation of the getattr() function with some examples.

More in Tux Machines

Getting to know Kyeong Sang Kim, Red Hat general manager for Korea

We’re delighted to welcome Kyeong Sang Kim to Red Hat as a general manager for Korea. In the new role, he will be responsible for Red Hat’s business operations in the country. Kyeong Sang is an expert in the field of IT consulting, supporting numerous business innovation projects for more than 25 years. Prior to joining Red Hat, Kyeong Sang served as the CEO of SICC (Ssangyong Information & Communications Corp), where he successfully led the company’s digital transformation to the cloud. He has also held several other leadership roles at global companies, including Accenture. We caught up with Kyeong Sang to find out more about his interest in open source and Red Hat, and his insights on leadership. Read more

CentOS is gone—but RHEL is now free for up to 16 production servers

Last month, Red Hat caused a lot of consternation in the enthusiast and small business Linux world when it announced the discontinuation of CentOS Linux. Long-standing tradition—and ambiguity in Red Hat's posted terms—led users to believe that CentOS 8 would be available until 2029, just like the RHEL 8 it was based on. Red Hat's early termination of CentOS 8 in 2021 cut eight of those 10 years away, leaving thousands of users stranded. As of February 1, 2021, Red Hat will make RHEL available at no cost for small-production workloads—with "small" defined as 16 systems or fewer. This access to no-cost production RHEL is by way of the newly expanded Red Hat Developer Subscription program, and it comes with no strings—in Red Hat's words, "this isn't a sales program, and no sales representative will follow up." Read more

Linux at Home: Digital Music Production with Linux

We are told by our governments that in the current crisis the single most important action we can take is to stay at home and minimise the amount of contact with others. The new variants of Covid-19 are much more transmissible than the virus’s previous version. The advice to stay safe is therefore even more important. It’s only with everyone abiding by the law can we protect our health services and save lives. In this series, we look at a range of home activities where Linux can play its part, making the most of our time at home, keeping active and engaged. The change of lifestyle enforced by Covid-19 is an opportunity to expand our horizons, and spend more time on activities we have neglected in the past. Read more

Android Leftovers