i
Python functionality and evolution
Installing Python (windows and Ubuntu)
IDLE (Integrated Development and Learning Environment)
Write the first python program and execute it
Keywords in Python
Identifiers in Python
Indentation in Python
Comments in Python
Multi-line Comments in Python
Getting user input
Python Function
Calling a function
Arguments in Function
Scope of Variables
Modules in Python
The PYTHON PATH-Variable
Python File Open
Python File Opening Modes
The file-Object-Attributes
Python File Close() Method
Python File Read/Write
Python File Position
Renaming and Deleting Files in Python
Python Directory Methods
File/Directory Methods
Exceptions in Python
The try-finally Clause
The argument of Exception
Raising Exceptions
Python Built-in Exceptions
Python OOPs Concepts
Python Classes/Objects
Creating Instance Objects
Accessing Attributes
Built-In Class Attributes
Garbage Collection
Python Inheritance
Overriding Methods
Method overriding
Data Hiding
Regular Expression
The match function
The search function
Match Object Methods & Description
Matching or Searching
Search or Replace
Regular Expression Modifiers / Option Flags
Grouping with Parentheses
Python Socket Programming
Python Socket Server
Python Socket Client
Send Data Between Clients
Python Socket or Server
Python Socket Clients
Points to ponder
In python any function can be called by other function in the same program.
Live Demo
#!/usr/bin/python
When the above program run it will give following output.
Output:“Hello this is python”
Passing by reference vs value
Every parameters in python are passed using reference. For example:
Live Demo
Here, we are maintaining the reference of the passed object and appending values in the same object. So, this would produce the following result –
Output:
Value present inside the function:[1,4,5,6]
Values outside the function: [11,20,33]
Below is example where argument passed by reference and being overwritten inside called function.
Live Demo
The parameter list is local to the function change. Changing list within the function does not affect list.
Output:
Values in the function: [1, 2, 3, 4]
Values out-sidefunction: [10, 20, 30]
Don't miss out!