
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10476 Articles for Python

480 Views
An open-source program used to automate web browsers is called Selenium Webdriver. It offers a platform-independent testing framework for web applications on many platforms and browsers. With the use of deep learning and computer vision algorithms, the food identification API Caloriemama can recognise different foods and their nutritional values from a single photograph. In this guide, we'll look at how the Selenium Webdriver automates the process of uploading photographs and retrieving the results, making it simple for developers to include food recognition functionality into their apps and provide consumers with correct nutritional information. Setup Firefox Executable Download the ... Read More

1K+ Views
Python is an increasingly popular programming language for Ethical Hacking, especially in today's digital world, where security is paramount. With the rise of cybercrime, it's essential to take proactive measures to safeguard our online assets. Ethical Hacking is a critical step in this process, involving the identification and resolution of system vulnerabilities before they can be exploited by malicious hackers. This article will explore how Python is used for Ethical Hacking, including its advantages and best practices. Basics of Ethical Hacking Hacking is broadly classified into three types - Black Hat Hacking, White Hat Hacking, and Grey Hat Hacking. Black ... Read More

560 Views
Calculating the average of a collection of data is done using the statistical measure of central tendency known as the harmonic mean. The harmonic mean of a given collection of integers may be determined in Python using the harmonic mean() function. Python 3.0 and subsequent versions of the language come with the statistics module, which has this function. We'll go through the harmonic_mean() function in Python's syntax, code methodology, and uses. Syntax The statistics module is included in Python 3.0 and later versions, so no installation is required. To use the harmonic_mean() function, simply import the statistics module in your ... Read More

23K+ Views
A timezone is a geographic area where all the clocks are set to the same standard time, but owing to political choices, historical time zone changes, disparities in daylight saving time, and other factors, various locations may have distinct time offsets. A collection of classes for working with dates, times, and timezones are provided by the Python datetime module and pytz library, respectively. Timezone management in software development is crucial since it affects how accurately programmes provide results. With the help of three annotated examples, this article will examine how to manage timezones in Python using the datetime and pytz ... Read More

15K+ Views
In Python, the spaces of a string with a special character can be replaced using replace() method. The replace method replaces all occurrences of the passed substring with a new substring. In this article, we will see how we can use replace() method to replace the spaces of a string with another specific substring. Syntax of Replace Method The syntax of the replace method is as follows − string.replace(old, new[, count]) The replace method takes two inputs, one is the old string which is the substring you want to replace and another input is the new string which is ... Read More

3K+ Views
In Python, we can open a file in a read-write mode without truncating the file by opening the file in a+ mode. Truncating a file refers to deleting the existing content of the file before opening the file. In this article, we will discuss how we can open the file in the read-write mode without truncating the file. What is a+ mode The a+ mode in Python is used to open the file in a read-write mode without truncating the file. When the file is opened in a+ mode it allows us to write new data at the end of ... Read More

2K+ Views
In Python, we can open a file in read-write mode by truncating the file by opening the file in w+ mode. Truncating a file refers to deleting the existing content of the file before opening the file. In this article, we will discuss how we can open the file in the read-write mode by truncating the file. What is the w+ mode The w+ mode in Python is used to open the file in read-write mode with file truncation. When the file is opened in w+ mode it allows us to read and write data in the file. If the ... Read More

10K+ Views
Enum in Python is a user-defined data type consisting of a set of named values. A finite set values of is defined using enums and these values can be accessed in Python using their names instead of their integer values. Enum makes the code more readable, and more maintainable and also enforces type safety. In this article, we will see how we can look up enums by their string value in Python. To look up an enum by string value we need to follow the following steps: Import enum module in the code Define enum with desired set of ... Read More

11K+ Views
In Python, we can insert a string into another string using the string concatenation method, string interpolation method, and using replace() method. Python provides various ways to insert a string into another string. In this article, we will understand all the methods with the help of suitable examples. Method 1: Using the Concatenation Operator String concatenation simply joins two strings together using the (+) operator. Any number of strings can be concatenated using this method in a simple and effective way. Example In the below example, we initialized three strings namely string1, string2, and inserted_string. We need to insert the ... Read More

3K+ Views
In Python, we can implement switch statements on a string using the dictionary-based approach, class-based approach, and lambda-based approach. Unlike other programming languages like Java, c++, etc python does not have an inbuilt switch statement. In this article, we will see how we can achieve the switch statement functionality in Python using a dictionary-based approach and class-based approach, and lambda-based approach. The Switch Statement in Other Programming Languages Before understanding how Python implements switch statements we need to understand how to switch statements work and how they are implemented in other programming languages. A switch statement is a conditional statement ... Read More