I understand the basic use of eval as shown as an example in the Python standard library:
x = 1
print(eval('x+1'))
2
Could someone please provide a more concise explanation with examples for the utilisation of both the globals and locals arguements.