top of page

LIST OF PYTHON FUNCTIONS

  • Writer: Sammy Lyu
    Sammy Lyu
  • Dec 12, 2025
  • 2 min read

Updated: Dec 13, 2025

There are a plethora of functions available in the Python language. And I am going to try to lis as many as possible here


As of writing, my Python version is 3.14




"print" function


The most basic function in Python and probably the first one you will learn, this function basically "writes down" whatever string, text or value you put within its "input". print("Hello, welcome to Python") The code above simply writes out: Hello, welcome to Python


"len" function This function is quite simple in the sense that it CALCULATES the numerical count of letters in your string. For example: len("function") would return 8. Because "function" has 8 letters. Be aware that this function calculates BLANK SPACES too, so "function 1" is 10 letters.


"input" function


This function allows other people to interact with your code by letting them type or "input" a response or answer to your code or questions. answer = input("Type your word in here to calculate its length") print(len(answer) The code above will allow another person to type in a word and have theletter count of that word returned to them.



"type" function This function allows us to CHECK which DATA TYPE our input or value is, so if we did: type("hello")


The value returned would be <str> or string. Same goes for other data types like float, integer and boolean.


"int" "str" "float" "bool" functions


These functions allows us to CONVERT DATA TYPES, so if we have a float, we can turn it into an integer like so: int("3.14") Which will turn the value 3.14 into 3 The only thing we have to watch out in our the VALUEERROR, which occurs when we try to mathematically impossible tasks, such as converting a string into an integer, as that is not possible unless we specify an interger to correlate with a certain string value.



"round" functions


This function simply ROUNDS UP OR DOWN a float value to the nearest integer. Useful for when you need whole numbers.


The function can also be used as a LIMITER to decimal places, like so:

round(3.1415, 2)


This will ensure that the output is written with a maximum of two decimal places at 3.14



"f-strings" This refers to a method of concatenating different data types without first needing to convert them. So we can print out a string with an integer in the same command, without needing to convert that integer first: print(f"Welcome to room number {2}")


This will give us the sentence: Welcome to room number 2 The alternative would be to convert the integer into a string using int:


print("Welcome to room number " + str(2))



 
 
bottom of page