Articles on Trending Technologies

Technical articles with clear explanations and examples

Tutorix - AI Tutor

Python program to build flashcard using class in python

Niharika Aitam
Niharika Aitam
Updated on 27-Mar-2026 1K+ Views

Generally, a flashcard is a learning tool that consists of a small card or piece of paper with information printed on one side. These are commonly used to aid in memorization and learning of facts, vocabulary, definitions, equations, or any other type of information that can be presented in a question-and-answer format. With the advancement of technology, flashcards have also been adapted into digital formats, such as mobile apps and online platforms, which provide additional features like multimedia content, spaced repetition algorithms, and progress tracking. There are different approaches available in Python to build flashcards using classes. Let's ...

Read More

Python program to add two octal numbers

Niharika Aitam
Niharika Aitam
Updated on 27-Mar-2026 493 Views

An octal number is a number expressed in the base-8 numeral system. It uses digits from 0 to 7. Octal numbers are commonly used in computer science and digital systems, especially when dealing with groups of three bits. In octal notation, each digit represents an increasing power of 8. The rightmost digit represents 8^0 (1), the next digit represents 8^1 (8), the next digit represents 8^2 (64), and so on. For example, the octal number 52 represents the decimal number as follows ? (5 * 8^1) + (2 * 8^0) = (5 * 8) + 2 = ...

Read More

Python program that renders a dictionary from two list with K values

Niharika Aitam
Niharika Aitam
Updated on 27-Mar-2026 272 Views

A Dictionary is an unordered collection of data structure which stores the elements as key and value. It is mutable and in other programming languages Dictionaries are also known as associative arrays, hash maps, or hash tables. The key is unique and the values can be a single element or a list of elements with duplicates. A Dictionary can be created using curly braces {} or by using the built-in function dict(). Let's see an example of creating a dictionary in Python ? Example student = { 'name': 'Tutorialspoint', ...

Read More

Progress Bars in Python

Niharika Aitam
Niharika Aitam
Updated on 27-Mar-2026 3K+ Views

Progress bars in Python are visual indicators that provide feedback on the progress of a task or operation. They are especially useful for long-running processes or iterations where it's helpful to show how much work has been completed and how much is remaining. A progress bar typically consists of a visual representation, such as a horizontal bar or textual display, which dynamically updates to reflect the task's progress. It also includes additional information like completion percentage, estimated time remaining, and relevant status messages. Progress bars serve several important purposes: Visual Feedback − Shows ...

Read More

Programming Paradigms in Python

Niharika Aitam
Niharika Aitam
Updated on 27-Mar-2026 4K+ Views

Programming paradigm is a specific approach or style of programming that provides a framework for designing and implementing computer programs. It encompasses a set of principles, concepts, and techniques that guide the development process and the structure of the code. Different paradigms have different ways of solving problems, organizing code, and expressing computations. Python supports multiple programming paradigms, making it a versatile language that allows developers to choose the most appropriate approach for their specific problem. Procedural Programming Procedural programming focuses on dividing a program into a set of procedures or functions. In Python, we can define ...

Read More

Program to calculate Dooms Day for a year

Niharika Aitam
Niharika Aitam
Updated on 27-Mar-2026 538 Views

The doomsday algorithm is a mathematical method developed by John Horton Conway to determine the day of the week for any given date. It's based on the concept that certain dates within each year always fall on the same day of the week, called the doomsday. The doomsday occurs on the following memorable dates − January 3rd (January 4th in leap years) February 28th (February 29th in leap years) March 7th April 4th May 9th June 6th July 11th August 8th September 5th October 10th November 7th December 12th Algorithm Steps Step 1: Calculate ...

Read More

Union Operation of two Strings using Python

Aayush Shukla
Aayush Shukla
Updated on 27-Mar-2026 869 Views

The union operation on strings combines two strings while removing duplicate characters. Python provides several approaches to perform string union operations, each with different characteristics and use cases. Using Sets Sets automatically remove duplicate elements, making them ideal for union operations ? def string_union_sets(first, second): set1 = set(first) set2 = set(second) union_result = set1.union(set2) return ''.join(union_result) # Example first = "What" second = "Where" result = string_union_sets(first, second) print(f"Union of '{first}' and '{second}': {result}") Union of ...

Read More

Removing the Initial Word from a String Using Python

Aayush Shukla
Aayush Shukla
Updated on 27-Mar-2026 317 Views

Removing the first word from a string is a common text processing task in Python. This tutorial covers five effective methods: split(), regular expressions, find(), space delimiter, and partition(). Method 1: Using split() Function The split() method divides the string into a list of words, then we join everything except the first element ? def remove_first_word(string): words = string.split() if len(words) > 1: return ' '.join(words[1:]) else: return ...

Read More

Remove the given Substring from the End of a String using Python

Aayush Shukla
Aayush Shukla
Updated on 27-Mar-2026 321 Views

When working with strings in Python, you may need to remove a specific substring from the end of a string. Python provides several built-in methods to accomplish this task efficiently, from simple string methods to regular expressions. Using endswith() Method The endswith() method checks if a string ends with a specific substring, making it perfect for conditional removal ? def remove_substring(string, substring): if string.endswith(substring): return string[:len(string)-len(substring)] else: return string # Example ...

Read More

Remove Substring list from String using Python

Aayush Shukla
Aayush Shukla
Updated on 27-Mar-2026 405 Views

Removing multiple substrings from a string is a common task in Python text processing. Python provides several approaches including replace(), regular expressions, list comprehension, and the translate() method. Using replace() Method The simplest approach is to iterate through substrings and use replace() to remove each one ? def remove_substrings_replace(main_string, substrings_to_remove): for substring in substrings_to_remove: main_string = main_string.replace(substring, "") return main_string text = "Hello, everyone! This is a extra string just for example." unwanted = ["everyone", "extra", "just"] result = ...

Read More
Showing 871–880 of 61,298 articles
« Prev 1 86 87 88 89 90 6130 Next »
Advertisements