Use of functions in python

 Welcome everyone,

Today we are going to learn how to use some functions in python

The most common functions are (len ,split) and many more.

So Today we will learn the use of these functions

1.len()

len is basically used to find out the total number of letters,numbers  in the sentence.

FOR EXAMPLE:



2.split()

split is basically a function which is used to break a sentence into words in a proper manner.

each word in this is separated by commas and apostrophe.

FOR EXAMPLE:




3.input()

input function is basically used to take the response of the user, like: Name ,Number and many more information .

INPUT:



OUTPUT:






4.int()

int function is a type of function which any number into integer number (integer number can be positive ,negative and whole number not a fraction or decimal number).

FOR EXAMPLE:





5.sorted()
sorted is basically used to arrange any unordered list in ordered list (alphabetically or number sequence).




6.range()

range is a most useful function in python , it is used to know the number within the range.

FOR EXAMPLE:



7.str()

str function is basically used to  convert a given value into string.

FOR EXAMPLE:


Comments

Popular posts from this blog

How To Make Tic-Tac-Toe Game With Python

How To Build Future Calendar With Python