Functions in Python: How to define and use them

If you want to use Functions in Python, you will need to define them first. Python is very straight forward in that.

For example, we want to create the function ‘Cyberwarzone’, and once the ‘Cyberwarzone’ function is called, it has to print ‘This is cyberwarzone’.

The code for this function looks like this:

      print ‘This is cyberwarzone’

The first Cyberwarzone(): is the function, and the second Cyberwarzone() is the moment we call that function. Everything which is written in that function will then be executed.

Share This Message