one-line code to find the length of the word python code example Example: how to get length of string in python string = "test" print(len(string)) #>>> Output "4"