You need to understand the difference between Jython scripting and Igntion’s built in expression language.
In expression language “left” is a valid function however you can not create and assign values to variables. If you want to assign the left 5 chars in a binding you simply put left(“hello world”, 5) in the expression.
Scripting is actual Jython code and you have to use string slicing as Jordan indicated.
myString = "hello world"
x = myString[:5]
Are you trying to get the machine name in an expression or in an event script? Once you determine the answer to that question we can be of more assistance as needed.
Edit: It looks like you are trying to use Jython scripting.
This is what you need: (I also removed the unnecessary parenthesis in the print statement)
strMachine_Name = system.tag.read("[System]Client/Network/Hostname")
strClientName = strMachine_Name.value[9:]