Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # SimpleSample functions
- # Just return...
- def my_func():
- return "Hello World!"
- print(my_func())
- # Print inside function
- def calculator(a, b):
- print "{} + {} = {}".format(a, b, (a+b))
- calculator(1,2)
- # Using another functions
- def combined():
- print(my_func())
- print("This is message from combined function")
- calculator(100,200)
- combined()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement