Python Forum
How to use list of symbols for sympy calculation in python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use list of symbols for sympy calculation in python?
#2
Such tricks are usually not recommended but you could try
>>> import sympy as sm
>>> L = ['a', 'b', 'c']
>>> globals().update(zip(L, sm.symbols(L)))
>>> a * a
a**2
Reply


Messages In This Thread
RE: How to use list of symbols for sympy calculation in python? - by Gribouillis - Mar-01-2020, 10:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python sympy problem for symbolic equation definition joellapointe_engineering 0 264 Mar-24-2024, 11:09 PM
Last Post: joellapointe_engineering
  Sympy nonlinsolve does not return explicit solution axelle 1 2,267 Jan-20-2021, 11:38 AM
Last Post: Serafim
  plot differential equation sympy dan_adi 0 3,025 Oct-13-2020, 10:44 AM
Last Post: dan_adi
  Attribute error - Sympy VictorG8 1 5,026 Apr-09-2020, 06:03 PM
Last Post: snippsat
  Next zero of a function on sympy VicenteM 0 2,102 Aug-21-2019, 04:58 PM
Last Post: VicenteM
  Question #1: Count symbols aapurdel 3 4,564 May-29-2019, 02:49 AM
Last Post: heiner55
  sympy psosmol 9 5,119 Mar-11-2019, 11:09 PM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020