This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Using python built-in function ‘len()’, we can get the number of characters in a string.
no_of_chars_in_string.py
str = 'Hello World' msg = f'"{str}" has {len(str)} characters' print(msg)
Output
"Hello World" has 11 characters
No comments:
Post a Comment