JIYIK CN >

Current Location:Home > Learning > PROGRAM >

All

How to Replace an Element in a Python List

Publish Date:2025/05/05 Author:JIYIK Category:Python

We can replace elements in Python lists in many ways. We can use Python list element indexing, for loops, map functions, and list comprehensions. This article will discuss the above methods to find and replace elements in Python lists. Sear...

Full

Writing floating point numbers to a file in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

Python makes writing data to a file a seamless task. The data is written to the file in the form of strings. In this article, you will learn how to write float values ​​to a file in Python. Writing floating point numbers to a file in Py...

Full

Reading binary files in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

The program or internal processor interprets the binary file. It contains bytes as content. When we read a binary file, an bytes object of type is returned. open() Read a binary file using the function in Python In Python, we have open() th...

Full

Read the first line of a file in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

In Python, we have built-in functions to handle different file operations. A text file contains a sequence of strings where each line \n is terminated by a newline character. In this tutorial, we will learn how to read the first line of a t...

Full

Get file extension in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

This tutorial shows how to get the file extension from a file name in Python. os.path Extract extension from file using module in Python The Python module os.path pre-makes useful utility functions for manipulating operating system file pat...

Full

Killing a Python process

Publish Date:2025/05/05 Author:JIYIK Category:Python

When programming in Python, sometimes our program gets stuck in an infinite loop. In this case, we need to terminate the program manually. This article will discuss different ways to kill a Python process. Killing a Python process using a k...

Full

Implementing the ReLU function in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

This tutorial will discuss the Relu function and how to implement it in Python. ReLU function Relu Functions are the foundation of machine learning and are essential when using deep learning. ReLU The term is Rectified Linear Unit an acrony...

Full

Calculating Mahalanobis distance in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

This tutorial will show you how to find the Mahalanobis distance between two NumPy arrays in Python. Use the function scipy.spatial.distance in the Python library cdist() to calculate the Mahalanobis distance The Mahalanobis distance is a m...

Full

Sliding average of NumPy arrays in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

The sliding average is often used to study time series data by calculating the average of data at a specific time interval. It is used to eliminate some short-term fluctuations and study data trends. When studying stock price trends, the si...

Full

Convert NumPy array to list in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

Lists and arrays are the two most basic and commonly used collection objects in Python. They are both mutable and are used to store a collection of elements under a common name and each element has a specific location that can be used to ac...

Full

Maximum integer in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

This tutorial will discuss the maximum integer value in different versions of Python and how we can get it. In Python 2, integers and long integers are different data types. The maximum value of an integer is 2 31 -1. If the value exceeds t...

Full

How to read input from stdin in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

This tutorial discussed stdin the methods of reading input from in Python. You can read directly from the console or from a file name specified in the console. In Python, fileinput.input() use stdin fileinput We can use the read module in P...

Full

Finding the maximum value in a Python dictionary

Publish Date:2025/05/05 Author:JIYIK Category:Python

This tutorial explains how to get a key with the maximum value in Python. Since the method has changed from the previous Python versions, it also lists some sample codes to clarify the concepts. Use operator.itemgetter() the method to get t...

Full

Changing dictionary values in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

This tutorial will discuss various ways to change the value of a particular key in Python dictionary. We can do this by using the following methods. dict.update() method for cycle. Dictionary Unpacking dict.update() How to change dictionary...

Full

Enumerating a dictionary in Python

Publish Date:2025/05/05 Author:JIYIK Category:Python

The function in Python enumerate() returns an object of enumeration type and adds a counter variable to iterate over a list or other type of collection. It makes looping over such objects easier. When we pass an enumeration object to list()...

Full

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Hottest

Tags

Scan the Code
Easier Access Tutorial