Articles on Trending Technologies

Technical articles with clear explanations and examples

Sort a list according to the Length of the Elements in Python program

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

We have a list of strings and our goal is to sort the list based on the length of strings in the list. We have to arrange the strings in ascending order according to their lengths. We can do this using Python built-in method sort() or function sorted() along with a key. Let's take an example to see the output − Input: strings = ["hafeez", "aslan", "honey", "appi"] Output: ["appi", "aslan", "honey", "hafeez"] Using sorted() Function The sorted() function returns a new sorted list without modifying the original list. We pass len as ...

Read More

How to style a href links in React using Tailwind CSS?

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 2K+ Views

React is a popular JavaScript library for building user interfaces. When creating React applications, styling components is crucial for creating visually appealing interfaces. Tailwind CSS is a utility-first CSS framework that provides pre-built classes for rapid UI development. In this article, we will learn how to style anchor tags (href links) in React using Tailwind CSS with different approaches and utility classes. Installation Requirements: To follow along with the examples, you need to include Tailwind CSS in your HTML file. We'll be using the CDN approach for simplicity in our demonstrations. Syntax Link ...

Read More

Reverse words in a given String in Python

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

We are given a string, and our goal is to reverse all the words which are present in the string. We can use the split() method and reversed() function to achieve this. Let's see some sample test cases. Input: string = "I am a python programmer" Output: programmer python a am I Input: string = "tutorialspoint is a educational website" Output: website educational a is tutorialspoint Python provides multiple approaches to reverse words in a string. Let's explore the most common methods. Method 1: Using split() and reversed() This approach splits ...

Read More

How to run Python code on Google Colaboratory?

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

Google Colaboratory (Colab) is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. It is hosted in Google Cloud and maintained by Google, allowing Python developers to write, run, and share code using a web browser. In this article, we will learn how to set up and use Google Colab for Python programming. Accessing Google Colab Navigate to the Google Colab website at https://colab.research.google.com/. You'll see the welcome screen with options to create a new notebook or open existing ones from various sources like GitHub, Google Drive, or upload from your computer. ...

Read More

How to create a Share Button with different Social Handles using HTML and CSS?

Riya Kumari
Riya Kumari
Updated on 15-Mar-2026 11K+ Views

To create share buttons with different social handles using HTML and CSS, we use basic CSS properties and HTML tags along with Font Awesome icons for professional-looking social media buttons. In this article, we will create share buttons for Facebook, Twitter, LinkedIn, Pinterest, Reddit, and WhatsApp with their respective brand colors and hover effects. Syntax button { background-color: brand-color; border: 1px solid brand-color; border-radius: radius; color: white; padding: value; } button:hover { ...

Read More

getpass() and getuser() in Python (Password without echo)

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

The getpass module in Python provides secure password input functionality without displaying typed characters on screen. This is essential for applications requiring password authentication where you need to hide sensitive input from shoulder surfing or screen recording. Basic Password Input with getpass() The getpass() function prompts for a password and reads input without echoing it to the terminal ? import getpass try: pwd = getpass.getpass() except Exception as err: print('Error Occurred:', err) else: print('Password entered:', pwd) The output of the above ...

Read More

4 Different Ways to Center an Element Using CSS

Riya Kumari
Riya Kumari
Updated on 15-Mar-2026 408 Views

When designing a webpage or document, it's important to ensure that elements are visually balanced and positioned correctly. One common task in web development is to center an element within its container. While it may seem like a simple task, there are multiple ways to achieve this using CSS. In this article, we will explore four different methods for centering elements using CSS. We'll cover techniques using text-align, margin, Flexbox, and CSS Grid, and discuss the pros and cons of each method. Whether you're new to web development or looking to improve your skills, mastering these techniques will help ...

Read More

Few mistakes when using Python dictionary

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

Dictionaries in Python are a data structure that maps keys to values as key-value pairs. They are one of the most frequently used data structures and have many useful properties. However, there are several common mistakes developers make when working with dictionaries that can lead to errors or unexpected behavior. Basic Dictionary Operations Before exploring common mistakes, let's review basic dictionary operations ? # Creating a dictionary days_dict = {'day1': 'Mon', 'day2': 'Tue', 'day3': 'Wed'} print(type(days_dict)) print(days_dict) # Using the dict() constructor days_dict2 = dict([('day1', 'Mon'), ('day2', 'Tue'), ('day3', 'Wed')]) print(days_dict2) ...

Read More

How to drop fill color to change the image color using HTML and CSS?

Riya Kumari
Riya Kumari
Updated on 15-Mar-2026 2K+ Views

In the world of web development, it's essential to have knowledge about the latest CSS and HTML techniques to add stunning visual effects to a website. One such effect is the color drop effect, which allows you to change the color of an image on hover by dropping a fill color on it. With this effect, you can make your website more interactive and engaging for the visitors. In this article, we will guide you through the process of creating a color drop effect using HTML and CSS. What is Drop Fill Color Effect? The drop fill ...

Read More

Datagram in Python

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

User Datagram Protocol (UDP) is a connectionless protocol that allows data transmission between network endpoints without establishing a persistent connection. In UDP communication, data is sent as datagrams — independent packets that contain both the message and addressing information. The sender transmits packets without tracking delivery status, making UDP faster but less reliable than TCP. Understanding UDP Communication UDP communication requires two main components: IP Address: Identifies the target machine on the network Port Number: Specifies which application should receive the data Python's socket module provides the necessary tools to implement UDP communication through ...

Read More
Showing 19761–19770 of 61,297 articles
Advertisements