Python String Length

Python String Length. In this program we can print the length of string using functions. A function is a reusable, ordered chunk of code that performs a single, connected activity. Functions provide your program more modularity and allow you to reuse a lot of code. As you may be aware, Python includes a number of built-in functions such as print(), but you may also construct your own.

a = "welcome to inlarn.com"
print(len(a))

21