Telegram Group & Telegram Channel
Что делает [::-1] ?

❗️ Ответ: [::-1] используется для изменения порядка массива или последовательности на обратный.

🔍 Например:
import array as arr
My_Array=arr.array('i',[1,2,3,4,5])
My_Array[::-1]


Вывод : array('i', [5, 4, 3, 2, 1])

🌟 [::-1] перепечатывает обратную копию упорядоченных структур данных, таких как массив или список. Исходный массив или список остается неизменным.

@python_job_interview
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/python_job_interview/904
Create:
Last Update:

Что делает [::-1] ?

❗️ Ответ: [::-1] используется для изменения порядка массива или последовательности на обратный.

🔍 Например:

import array as arr
My_Array=arr.array('i',[1,2,3,4,5])
My_Array[::-1]


Вывод : array('i', [5, 4, 3, 2, 1])

🌟 [::-1] перепечатывает обратную копию упорядоченных структур данных, таких как массив или список. Исходный массив или список остается неизменным.

@python_job_interview

BY Python вопросы с собеседований


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/python_job_interview/904

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

If riding a bucking bronco is your idea of fun, you’re going to love what the stock market has in store. Consider this past week’s ride a preview.The week’s action didn’t look like much, if you didn’t know better. The Dow Jones Industrial Average rose 213.12 points or 0.6%, while the S&P 500 advanced 0.5%, and the Nasdaq Composite ended little changed.

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.

telegram from hk


Telegram Python вопросы с собеседований
FROM USA