title: Can I make a sympy function that takes a string as well as a float as input?
body: <p>Coming from Wolfram Language I would expect to be able to define anything in a loose manner, so that floats and string can always be used interchangeably in my functions, like here, where I am putting a string  <code>2.0(1)</code> to muliply a symbol <code>x</code></p>
  
  <pre><code>In[40]:= SinN[n_, x_] := Sin[n*x]
  
  In[42]:= SinN["2.0(1)", x]
  
  Out[42]= Sin["2.0(1)" x]
  </code></pre>
  
  <p>I am struggling with sympy to do the same, anyone has ideas?</p>
  
  <p>I can do this, but not able to put it into a function</p>
  
  <pre><code>x=sympy.symbols("x",real=True)
  n=sympy.symbols("n")#
  expression=sympy.sin(n*x)+n*x
  expression.subs(x,'2.0(1)')
  </code></pre>
  
  <p>PS
  Related to this, I was thinking that it would be great indeed if there was a way to tell sympy something like to consider every variable in a cell as symbol, without having to declare (very annoying) all the variables that I want to be treated as symbols. </p>