Toggle navigation
Log in
Sign Up
Log in
Sign Up
Appium
C
C#
C++
Docker
Go
Informatica
Java
JavaScript
Kafka
Numpy
Oracle
Pandas
PHP
Py Spark
Python
R
React Native
Scipy
SFTP
Tableau
Teradata
TGMC
UNIX
Introducing
Radical.sh
Forget Code launches a powerful code generator for building API's
Forget_Code.Models.CategoryViewModel
Add a new snippet
Basics
3
Conditional Statements
2
Dictionary
4
Input & Output
1
Lists
20
Sorting
1
Strings
1
Tuple
4
Choose Category
Function in Python
Forget Code
Python
Function
In python, function is defined using def keyword. And functions should be declared before their usage
For Example
def add(a,b): return a+b; print add(10,20);
Output
30
add is a function name, accepting two input arguments a, b. Print calls the user defined function with input arguments 10,20 and output is printed on the console.
Tags for Function in Python
DP_Basics
Simple function in python
define function in python
how to use function in python
define keyword in python
function with arguments in python
add two numbers using function in python
Contribute to Forget Code, help others.
Add snippet