December 2016
Beginner
197 pages
4h 18m
English
© Sanjib Sinha 2017
Sanjib Sinha, Beginning Ethical Hacking with Python, 10.1007/978-1-4842-2541-7_14
Sanjib Sinha1
(1)Howrah, West Bengal, India
Let us first define the function and try to know why function is being used in Python. Consider this code :
<code>#!/usr/bin/python3def main():print("This is main function.")if __name__ == "__main__":main()</code>
And the output is:
<blockquote>This is main function.</blockquote>
What does that mean? First of all, let us understand what function does mean. A function is used in any programming language to reuse code. Programmers are lazy and so they don't want to write again and again. And it is not a good idea to write the same thing again and again. So the concept of reusability ...
Read now
Unlock full access