DEV Community

Saravanan B
Saravanan B

Posted on • Edited on

Python Functions ....

Function 1:

len() -> This function is used to find the length of string.

string_name = ("Hello")
print(len(string_name))

Output : 5

This function will not execute int or float values.

Round -> As the name suggest it round the floating point values.

      If value>0.5 = 1
      else value < 0.5 = 0 
Enter fullscreen mode Exit fullscreen mode

Example:
1.6 is return as 2
1.1 is return as 1.
Image description

Lower() -> "Dev".lower()then it return "dev"
Count -> "Dev".count("e") then it count and return 1.

Image description

Top comments (0)