Skip to main content
added 77 characters in body
Source Link
rhermans
  • 37.4k
  • 4
  • 61
  • 152

StringForm withStringForm with named arguments

In python, this is possible:

example:

a = "{x}, {y}".format(x=5, y=12) print(a)

a = "{x}, {y}".format(x=5, y=12)
print(a)

result:

5, 12

In MathematicaMathematica, I used

StringForm ["``,``",5,12]

StringForm ["``,``",5,12]

but I couldn't use named arguments.

Is there any way to do this in MathematicaMathematica? like a :

StringForm ["`x`,`y`",x->5, y->12]

StringForm ["`x`,`y`",x->5, y->12]

StringForm with named arguments

In python, this is possible:

example:

a = "{x}, {y}".format(x=5, y=12) print(a)

result:

5, 12

In Mathematica, I used

StringForm ["``,``",5,12]

but I couldn't use named arguments.

Is there any way to do this in Mathematica? like a :

StringForm ["`x`,`y`",x->5, y->12]

StringForm with named arguments

In python, this is possible:

example:

a = "{x}, {y}".format(x=5, y=12)
print(a)

result:

5, 12

In Mathematica, I used

StringForm ["``,``",5,12]

but I couldn't use named arguments.

Is there any way to do this in Mathematica? like a :

StringForm ["`x`,`y`",x->5, y->12]
Source Link

StringForm with named arguments

StringForm with named arguments

In python, this is possible:

example:

a = "{x}, {y}".format(x=5, y=12) print(a)

result:

5, 12

In Mathematica, I used

StringForm ["``,``",5,12]

but I couldn't use named arguments.

Is there any way to do this in Mathematica? like a :

StringForm ["`x`,`y`",x->5, y->12]