Length of the values in python

Hi,
How to get the length of the values in doctype in python.

like if we have field name with values xyz, abcdefgh, wewe

I should get 3,8,4

Each s different record

doc.field_name.length s not working

len(doc.field_name)

you can use len()

>>> s = '123456789'
>>> len(s)  # the length of s value
9