Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways

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

    round(2.54,1)
    2.5

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 😛

About TheDataMonkGrand Master

I am the Co-Founder of The Data Monk. I have a total of 6+ years of analytics experience 3+ years at Mu Sigma 2 years at OYO 1 year and counting at The Data Monk I am an active trader and a logically sarcastic idiot :)

Follow Me