← Go Back
How to Count Number of Characters in a String
Using thelen()
built-in function:greeting = "Hello, world!"
chars = len(greeting)
print(chars) # Prints 13
🐍 You might also find interesting: