define a function in python without arguments code example
Example 1: specify return type python function
def greeting(name: str) -> str:
return 'Hello, {}'.format(name)
Example 2: define a function in python without arguments
def hello_function():
... print 'Hello World, it\'s me. Function.'
...
>>> hello_function()
Hello World, it's me. Function.