Home
Python
2D
Application
Buildin Function
Class
Data Structure
Data Type
Database
Development
Dictionary
Event
Exception
File
Function
GUI Pmw
GUI Tk
Language Basics
List
Math
Network
String
System
Thread
Tuple
Utility
XML
Menu
Define function: return int value : Function Return « Function « Python
Python
Function
Function Return
Define function: return int value
def inc(x):
return
x + 1 foo = 10 foo = inc(foo) print foo
Related examples in the same category
1.
Return more than one parameters
2.
A Simple function definition: return a tuple.
3.
Save function result into a variable
4.
Return three value