/
ilya.petrash
/
SimplePyScripts
Обзор
Документация
Войти
/
ilya.petrash
/
SimplePyScripts
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
solution_of_expression__sympy__parser/main.py
20 строк
443 B
gil9red
Refactoring. Using black code style
26 июн 2023, 13:25
26 июн 2023, 13:25
04260cb
Код
Авторство
О чём код?
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "ipetrash" from sympy.parsing.sympy_parser import ( parse_expr, standard_transformations, implicit_multiplication_application, ) from sympy import * input_str = "(x+1)(y+1)+(x+1)y+xy" transformations = standard_transformations + (implicit_multiplication_application,) print( expand(parse_expr(input_str, transformations=transformations)) ) # 3*x*y + x + 2*y + 1