pascalabcnet/TestSuiteAdditionalLanguages/SPythonTests/CompilationSamples/tuples.pys
Александр Земляк b8bda89f0f
Исправление div (//) и mod (%) для SPython (#3384)
* Fix div and mod in SPython

* Fix generic type names search in SPython symbol table

* Small fixes

* Add few checks in Intellisense

* Add comments about units compilation order
2026-02-02 21:14:27 +03:00

9 lines
245 B
Plaintext

# Использование кортежей
a,b = divmod(-7, 3)
temp = divmod(-7, 3)
t: tuple[int, int] = divmod(-7, 3)
t1: tuple[int] = tuple.Create(0) # из одного эл-та пока так
print(a == t.Item1)
print(b == t.Item2)