From 354ffbcd8dcfbd4a39a5d5b1272434f9b5230cb5 Mon Sep 17 00:00:00 2001 From: Roman Dmytruk Date: Thu, 1 Oct 2026 14:51:08 +0000 Subject: [PATCH] Update u3/flatten_array.py --- u3/flatten_array.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ u3/flatten_array.py b/ u3/flatten_array.py index 5a78b93..7ee75d7 100644 --- a/ u3/flatten_array.py +++ b/ u3/flatten_array.py @@ -2,9 +2,9 @@ def flatten(iterable): result = [] for item in iterable: if isinstance(item, (list, tuple)): - # Якщо елемент є списком або кортежем — викликаємо flatten рекурсивно + # is the element is a list or a tuple, we call 'flatten' recursively /// Ak je prvok zoznamom alebo tupľom, voláme funkciu flatten rekurzívne result.extend(flatten(item)) elif item is not None: - # Додаємо елемент лише якщо він не None + # pridame prvok len vtedy, ak nie je None /// add an element only if it is not None result.append(item) return result \ No newline at end of file