Share python 8.1

** Python 8.1: Có gì mới? **

Python 8.1 đã được phát hành vào ngày 4 tháng 10 năm 2022. Bản phát hành này bao gồm một số tính năng và cải tiến mới, bao gồm:

*** Cú pháp mới cho các biểu thức gán **.Bây giờ bạn có thể sử dụng toán tử Walrus (`: =`) để gán một giá trị cho một biến trong cùng một biểu thức với bạn sử dụng nó.Ví dụ:

`` `Python
x: = y + 1
`` `

*** Cải thiện hỗ trợ cho chuỗi F **.Bây giờ bạn có thể sử dụng dây F để định dạng các bộ dữ liệu và từ điển.Ví dụ:

`` `Python
in (f "tuple là {(1, 2, 3)}")
print (f "Từ điển là {{'A': 1, 'B': 2, 'C': 3}}")
`` `

*** Các chức năng mới để làm việc với ngày và thời gian **.Lớp `dateTime.timezone` đã được thêm vào, cho phép bạn tạo và làm việc với múi giờ.Phương thức `datetime.timedelta.total_seconds ()` cũng đã được thêm vào, trả về tổng số giây trong một đối tượng `datetime.timedelta`.

*** Cải thiện hiệu suất **.Python 8.1 bao gồm một số cải tiến hiệu suất, bao gồm nối chuỗi nhanh hơn và quản lý bộ nhớ tốt hơn.

Để biết thêm thông tin về tất cả các tính năng và cải tiến mới trong Python 8.1, hãy xem [Ghi chú phát hành] (https://docs.python.org/3/whatsnew/8.1.html).

** Hashtags: **

* #Python
* #python8
* #Python8.1
* #các tính năng mới
* #Improvements
=======================================
**Python 8.1: What's New?**

Python 8.1 was released on October 4, 2022. This release includes a number of new features and improvements, including:

* **New syntax for assignment expressions**. You can now use walrus operator (`:=`) to assign a value to a variable in the same expression as you use it. For example:

```python
x := y + 1
```

* **Improved support for f-strings**. You can now use f-strings to format tuples and dictionaries. For example:

```python
print(f"The tuple is {(1, 2, 3)}")
print(f"The dictionary is {{'a': 1, 'b': 2, 'c': 3}}")
```

* **New functions for working with dates and times**. The `datetime.timezone` class has been added, which allows you to create and work with timezones. The `datetime.timedelta.total_seconds()` method has also been added, which returns the total number of seconds in a `datetime.timedelta` object.

* **Improved performance**. Python 8.1 includes a number of performance improvements, including faster string concatenation and better memory management.

For more information on all the new features and improvements in Python 8.1, see the [release notes](https://docs.python.org/3/whatsnew/8.1.html).

**Hashtags:**

* #Python
* #python8
* #python8.1
* #NewFeatures
* #Improvements
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top