Important Built-in functions in Python

We all know what a function is and how helpful it is?
Just iterating what we already know, Functions are nothing but a reusable piece of code which often takes some value, processes it and returns the result. The best thing about a function is that you can directly call the function anywhere in the code. Following are some of the important built-in functions which are mostly used in our projects. We are not giving an extensive and boring list of all the functions present in this Universe, the below list is hand-picked 😛

1. Typecasting – You can change the data type of a variable by typecasting it

x = False
z = int(x)

2. Round() – Round function is used to round off any decimal number


3.Sorted(list, reverse = TRUE) – IT will sort the list in descending order

4.list_name.index(“element”) – It will get you the index of the specific element

5.  list_name.append(“‘Saurav”) – It will append the element at the very end of the list.

6. list_name.upper() will change every element in the upper case

7. x.count(“data”) – This will count the number of occurrences of the word “data” in  x

8. x.reverse() will reverse the order of the list x

9. max() and min() functions – Gets you maximum and minimum value from the list

10. len() – Returns the length of an object

11. abs() – Returns absolute value of a number

12. print() – Prints anything 😛

Above are all the built-in functions which we generally use. If you want the complete list, then go here. I just gave them a backlink 😛

Leave a Reply

Your email address will not be published. Required fields are marked *