Articles on Trending Technologies

Technical articles with clear explanations and examples

Convert a list of multiple integers into a single integer in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 3K+ Views

Sometimes we may have a list whose elements are integers. There may be a need to combine all these elements and create a single integer out of it. In this article we will explore the ways to do that. Using List Comprehension with join() The join() method can join all items in a list into a string. We use list comprehension to convert each integer to a string, then join them together ? Example numbers = [22, 11, 34] # Given list print("Given list:", numbers) # Convert each integer to string and join ...

Read More

Flip the text using CSS

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 15-Mar-2026 5K+ Views

To flip the text using CSS, we will be using CSS transform property. Flipping is a technique that transforms or mirrors an element on particular axis (horizontal or vertical). We will be understanding three different approaches to flip the text using CSS. Syntax selector { transform: scaleX(-1); /* Horizontal flip */ transform: scaleY(-1); /* Vertical flip */ transform: rotateX(180deg); /* Mirror effect */ } Method 1: Horizontal Text Flip using scaleX Function To horizontally flip the ...

Read More

Consecutive elements pairing in list in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 829 Views

During data analysis using Python, we may need to pair up consecutive elements of a list. This creates overlapping pairs where each element (except the first and last) appears in two pairs. Here are the most common approaches to achieve this. Using List Comprehension with range() We can use list comprehension with range() to iterate through consecutive indexes and pair adjacent elements ? numbers = [51, 23, 11, 45] # Given list print("Given list:", numbers) # Pair consecutive elements using list comprehension result = [[numbers[i], numbers[i + 1]] for i in range(len(numbers) - 1)] ...

Read More

Fading Text Animation Effect Using CSS3

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 15-Mar-2026 5K+ Views

Fading is a visual representation of a gradual transition between two states of visibility. We can perform fading animation using the @keyframes rule and opacity property in CSS3. In this article we are having two div boxes with some written content in the child div. Our task is to apply fading text animation effect using CSS3. Syntax @keyframes animationName { from { opacity: startValue; } to { opacity: endValue; } } selector { animation: animationName duration; opacity: initialValue; } ...

Read More

Consecutive element maximum product in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 414 Views

Python provides several approaches to find the maximum product of two consecutive digits in a string. This is useful when processing numerical data stored as strings and finding optimal adjacent pairs. Using zip() and max() We can create pairs of consecutive elements using zip() with list slicing, then find the maximum product ? number_string = '5238521' # Given string print("Given String:", number_string) # Convert to list for easier processing digits_list = list(number_string) print("String converted to list:", digits_list) # Using zip() to create consecutive pairs and max() to find maximum product result = max(int(a) ...

Read More

Concatenate two lists element-wise in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 1K+ Views

Python has great data manipulation features. In this article we will see how to combine the elements from two lists in the same order as they are present in the lists. Using zip() with List Comprehension The zip() function pairs elements from two lists, allowing us to concatenate them element-wise. We can use list comprehension to create a new list with concatenated elements ? list_a = ["Outer-", "Frost-", "Sun-"] list_b = ['Space', 'bite', 'rise'] # Given lists print("Given list A:", list_a) print("Given list B:", list_b) # Use zip with list comprehension result = [i ...

Read More

Creating an Animated Side Navbar using HTML and CSS

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 15-Mar-2026 808 Views

A Navigation Bar is a GUI element which allows users to navigate through a website or application. It is typically a list of links at the top or side of the screen and assists users in navigating to various areas or pages within the website. In this article, we will create an animated side navigation bar using HTML, CSS, and JavaScript. The sidebar will slide in from the left when opened and smoothly close when dismissed. Syntax #sidebar { width: 0; transition: width 0.5s; } #sidebar.open { ...

Read More

Combining values from dictionary of list in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 655 Views

When working with a Python dictionary that has lists as values, you may need to create all possible combinations of keys and their corresponding values. This is useful for generating test data, configuration combinations, or exploring different scenarios. Using sorted() and product() The product() function from itertools creates a Cartesian product of iterables. By sorting the dictionary keys first, we ensure consistent ordering in our combinations ? import itertools as it schedule_dict = { "Day": ["Tue", "Wed"], "Time": ["2pm", "9am"], } # Sorting dictionary keys for ...

Read More

Create a Letter-Spacing Animation Effect using HTML and CSS

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 15-Mar-2026 758 Views

In this article, we are going to create a letter-spacing animation effect using HTML and CSS. To do so, we have CSS letter-spacing property and CSS @keyframes rule. CSS Letter-spacing Property The letter-spacing property in CSS is used to set the horizontal spacing between the text characters. If we assign a positive value for this property, the character spaces will spread farther apart. If we assign a negative value for this property, it brings the characters closer together. Syntax Following is the syntax of CSS letter-spacing property − letter-spacing: value; ...

Read More

Combining two sorted lists in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 432 Views

Lists are one of the most extensively used Python data structures. In this article we will see how to combine the elements of two lists and produce the final output in a sorted manner. Using + Operator with sorted() The + operator can join the elements of two lists into one. Then we apply the sorted function which will sort the elements of the final list created with this combination ? listA = ['Mon', 'Tue', 'Fri'] listB = ['Thu', 'Fri', 'Sat'] # Given lists print("Given list A is :", listA) print("Given list B is :", ...

Read More
Showing 19511–19520 of 61,297 articles
Advertisements