You use:
a = Constant(some_value)
a.assign(Some other value)
please note that you in your question do not specify what version of FEniCS (i.e. legacy or DOLFINx), or the version of the respective software you are using, making it very hard to give any guidance.
For further questions, please follow the guidelines in: Read before posting: How do I get my question answered?