Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to return a value from a function in python

def function():
	x = "random"
    print("random")
    return x
  
a = function() #Runs line 3, makes a the return value ("random")
 
PREVIOUS NEXT
Tagged: #return #function #python
ADD COMMENT
Topic
Name
5+2 =