TGViewer
Python Community Python Community @python_community_ru · 11.6K subscribers
Post #1698 3.12K
👨🏼‍💻 Решение к задаче про змейку ☝️

import os

def Snake(n):
# великолепный код тут


inputFile = open(os.getenv("INPUT_FILE") , "r")

a = inputFile.readline()
result = "|".join(map(lambda x: " ".join(map(str, x)), Snake(a)))

outputFile = open(os.getenv("OUTPUT_FILE"), "w")
outputFile.write(result)

inputFile.close()
outputFile.close()

Python Community
  • 🤔 8
More from @python_community_ru
  1. Oct 8, 2026🦙 Ollaya: запуск моделей принятия решений в стиле Ollama. Скачиваете модель, поднимаете л…
  2. Oct 7, 2026‍Python 3.15 почти готов: вышел RC3, финальный релиз 9 октября Python 3.15.0rc3 вышел 2 ок…
  3. Oct 6, 2026🐍 Python Workers в Cloudflare вышли в GA Cloudflare официально сделала Python полноценным…
  4. Oct 5, 2026‍🖥 Python-дайджест недели: PyPy 8 с Python 3.12, отладка None и фреймворки для агентов Py…
  5. Oct 4, 2026🐍 Python тормозит? В 3.15 добавили инструмент, который покажет где Tachyon (`profiling.sa…
  6. Oct 2, 2026webAI выпустила TwIL-LM3-Pro - компактную модель на 3,66B параметров специально для формал…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →