gram news
Python tests channel avatar

Python tests

@python_testit

Тесты и задания python разработчиков По всем вопросам- @notxxx1 @ai_machinelearning_big_data - машинное обучение @programming_books_it - бесплатные it книги @pythonl - 🐍 @ArtificialIntelligencedl - AI @datascienceiot -ds книги

ProjectsRUProgramming

6,890subscribers

Open the Channel

Latest posts

  • Python tests

    6 Sept, 14:14

    🐍 Python считает эти даты равными. Хотя между ними целый часВ ночь перевода часов время 02:30 наступает дважды:from datetime import datetime, UTC from zoneinfo import ZoneInfotz = ZoneInfo("Europe/Berlin")a = datetime(2026, 10, 25, 2, 30, tzinfo=tz, fold=0) b = datetime(2026, 10, 25, 2, 30, tzinfo=tz, fold=1)print(a) # 2026-10-25 02:30:00+02:00print(b) # 2026-10-25 02:30:00+01:00Это разные моменты:
  • Python tests

    14 Aug, 14:04

  • Python tests

    14 Aug, 14:04

    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    14 Aug, 12:04

    🔥 Python + AI без игрушечных демок. Курс для тех, кто хочет собирать рабочие системы.Stepik: «Python современный AI для разработчика и автоматизации задач»63 урока, 382 шага, практика с кодом и автопроверкой.Внутри: RAG, tool calling, агенты, evals, MCP, Ollama, vLLM, pgvector + HNSW, безопасный text-to-SQL, prompt injection, кэш, очереди и sandbox для агентного кода.Плюс реальные автоматизации: почта, отчёты, боты, вебхуки и браузерные сценарии.Для тех, кто уже знает Python и хочет перейти к production AI.⏳ 72 часа скидка 55%https://stepik.org/a/295921
    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    22 Jul, 08:24

  • Python tests

    22 Jul, 08:24

    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    15 Jul, 13:03

  • Python tests

    15 Jul, 13:03

    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    14 Jul, 13:11

  • Python tests

    14 Jul, 13:11edited

    Что выведет код ?
    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    9 Jul, 15:22

    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    8 Jul, 09:01

  • Python tests

    8 Jul, 09:01

    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    11 Jun, 16:09

  • Python tests

    11 Jun, 16:09

    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    27 May, 16:12edited

    🐍 Python Pop Quiz: что окажется внутри silly_dict?Вопрос звучит просто, но тут ловушка в том, как Python работает с ключами словаря.Варианты:A) {"py": "amazing"} B) {"py": 10} C) {"py": "amazing", <__main__.MyClass object at ...>: 10} D) None of the aboveСуть в том, что ключи в dict сравниваются не по тому, как они выглядят в коде, а через __hash__ и __eq__.Если объект пользовательского класса имеет такой же хеш, как строка "py", и при сравнении считается равным этой строке, то Python решит: это один и тот же ключ.В таком случае новое значение просто перезапишет старое.Ответ: B) {"py": 10}Маленький пример, но отлично показывает важную вещь: в Python ключ словаря - это не “текстовое имя”, а объект с правилами хеширования и сравнения.
    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    15 May, 12:30

  • Python tests

    15 May, 12:30

    Image from a post by Python testsImage from a post by Python tests
  • Python tests

    16 Apr, 14:06

  • Python tests

    16 Apr, 14:06

    Image from a post by Python testsImage from a post by Python tests