Tutorial Material

Python Functions

Share to

A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.

Defining Python Functions

You can define functions to provide the required functionality. Here are simple rules to define a function in Python.

Example of function

def printme( str ):
  "This prints a passed string into this function"
  print (str)
  return

Edit this tutorial

Belajarpython x DevMode Community
OFFICIAL COMMUNITY

Gabung Komunitas Developer & Kreator Digital

Dapatkan teman coding, sharing project, networking dengan expert, dan update teknologi terbaru.

Bebas spam. Unsubscribe kapan saja. DEVMODE Community