top of page
Search

Defining a function in Python and returning a value.

In order to define a function, your function block should begin with the defkeyword. This would then be followed by the function name with added double parentheses "(())". Inside the parentheses, you would place your parameters or arguments. End your first line of function with a colon ":". The keyword returnwould be used to return a value from a function. Example:


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

 
 
 

Recent Posts

See All
Assessing PCI DSS Requirement 8

Assessing PCI DSS Requirement 8: Secure Passwords for Organizations Processing Credit Card Data Credit card information is a top target...

 
 
 
The Importance of Risk Management

The Importance of Risk Management in Cyber Security Assessments and Audits In today's digital age, the risk of cyber-attacks and data...

 
 
 
The Importance of Auditing

The Importance of Auditing: A Comparative Analysis of Internal and External Audits IT auditing is the process of assessing a company's...

 
 
 

Comments


bottom of page