Telegram Group & Telegram Channel
Сортировка списков

В Python есть два встроенных способа для сортировки списков — функция sorted() и метод list.sort(). Результат в обоих случаях одинаков, но всё же есть нюансы.

Функция sorted() принимает на вход аргумент в виде списка, а возвращает уже новый, отсортированный список. При этом исходный список не изменяется.

Метод sort() в свою очередь применяется к списку, изменяет его непосредственно и ничего не возвращает.

#списки



tg-me.com/python_academy/970
Create:
Last Update:

Сортировка списков

В Python есть два встроенных способа для сортировки списков — функция sorted() и метод list.sort(). Результат в обоих случаях одинаков, но всё же есть нюансы.

Функция sorted() принимает на вход аргумент в виде списка, а возвращает уже новый, отсортированный список. При этом исходный список не изменяется.

Метод sort() в свою очередь применяется к списку, изменяет его непосредственно и ничего не возвращает.

#списки

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/970

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

In many cases, the content resembled that of the marketplaces found on the dark web, a group of hidden websites that are popular among hackers and accessed using specific anonymising software.“We have recently been witnessing a 100 per cent-plus rise in Telegram usage by cybercriminals,” said Tal Samra, cyber threat analyst at Cyberint.The rise in nefarious activity comes as users flocked to the encrypted chat app earlier this year after changes to the privacy policy of Facebook-owned rival WhatsApp prompted many to seek out alternatives.

What is Telegram Possible Future Strategies?

Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.

Python Academy from jp


Telegram Python Academy
FROM USA