How to explicitly set a boundary condition

Hello. Is it possible somehow in FEniCS to explicitly set the value on the borders (left and right borders, respectively)

The question is fairly generic, and with very little context it is hard to give you any other guidance than suggesting you to look through the demos:
https://fenicsproject.org/olddocs/dolfin/latest/python/demos.html
Please also read: Read before posting: How do I get my question answered? - #4 by nate
before posting further questions