JIYIK CN >

Current Location:Home > Learning >

All

How to wait for user input in Python

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

This tutorial shows you how to wait for a keypress before doing something else in Python. input() Waiting for input in Python input() Is a Python function that allows you to process user input in your code. It temporarily stops all processe...

Full

Finding a key by value in a Python dictionary

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

A dictionary is a collection of elements in key-value pairs. The elements stored in a dictionary are unordered. In this article, we will look at different ways to find a key by value in a Python dictionary. Normally, you use keys to access...

Full

If not statement in Python

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

The statement in Python if checks a specific condition and executes a block of code if the condition is true. if not The does the opposite of if the statement. It tests if a condition is false and then executes some statements. Using if not...

Full

Comparing two dates in Python

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

This tutorial explains how to compare two dates in Python. There are multiple ways to determine which date is greater, so the tutorial also lists different sample codes to illustrate the different methods. Comparing two dates in Python usin...

Full

Writing bytes to a file in Python

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

In this tutorial, we will look at how to write bytes to a binary file in Python. Binary files contain strings of type bytes. When we read a binary file, an object of type bytes is returned. In Python, bytes are represented by hexadecimal nu...

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

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

Appending 2D Arrays in Python

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

In Python, we can have ND arrays. We can use NumPy module to process arrays in Python. This tutorial demonstrated the different methods you can use to append values ​​to a two-dimensional array in Python. Use append() the function to ap...

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

Get a list of time zones using Python

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

When developing real-world applications, software developers must ensure that the application can support users from both their own country and other parts of the world. Since most countries have different time zones and many people around...

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