Electron microscopy
 
return() in Python
- Python Automation and Machine Learning for ICs -
- An Online Book -
Python Automation and Machine Learning for ICs                                 http://www.globalsino.com/ICs/        


=================================================================================

 

==================================================

Relevant functions: break, return, limit, quit/exit.

===========================================

Return multiple values: code:
         Return value to outside of the funtion
Output:         
         Return value to outside of the funtion

===========================================

Return value to outside of the funtion: code:
         Return value to outside of the funtion
Output:         
         Return value to outside of the funtion

===========================================

Access variable inside a function by using return statement, access variable inside a function locally, and access outside variable through a function: code:
          Access variable inside a function by using return statement, access variable inside a function locally, and access outside variable through a function
Output:         
          Access variable inside a function by using return statement, access variable inside a function locally, and access outside variable through a function
===========================================

Both below have a similar function:

Divide argument a by argument b, and return the result: code:
        Add 60 to argument a, and return the result
Output:
        2.0

=============

Divide argument a by argument b, and return the result: code:
        Add 60 to argument a, and return the result
Output:
        2.0

===========================================

The returned value is 0: code:
        Add 60 to argument a, and return the result
Output:
       The returned value is 0

==============

The returned value is 0: code:
        Add 60 to argument a, and return the result
Output:
       The returned value is None

===========================================

The returned value is from the defined function: code:
        Add 60 to argument a, and return the result
Output:
      Add 60 to argument a, and return the result

=================

The returned value is from the defined function: code:
        Add 60 to argument a, and return the result
Output:
         n is 10.2
         m is 0.09411764705882353

============================================

Sum the numbers of a defined list: code:
         Sum the numbers of a defined list
Output:         
         23

============================================

Use decorators: code:
         Sum the numbers of a defined list
Output:         
         Sum the numbers of a defined list

============================================

Comparison between iterative algorithm and recursive algorithm: code:          
          Recursive function to count up
Output:         
          Recursive function to count up

============================================

Use of "return" to stop infinite cycling of opening the same images:
          Recursive function to count up

============================================

Access a single variable inside a function: Code:
         Automatically Review, Scroll, Click Webpage and Its Link
Output:         
         Automatically Review, Scroll, Click Webpage and Its Link

============================================

Access a dictionary inside a function: Code:
         Automatically Review, Scroll, Click Webpage and Its Link
Output:         
         Automatically Review, Scroll, Click Webpage and Its Link

============================================

Global Access to the returned local variable only: Code:
         Automatically Review, Scroll, Click Webpage and Its Link
Output:         
         Automatically Review, Scroll, Click Webpage and Its Link

============================================

AAA. Send a variable or a updated variable back to a script in a child folder, and send a variable or a updated variable back to a script in its parent folder. Code in Parent folder:
         Replace headers in a csv file         
      Code in Child folder ("MyChildFolder"):         
         Replace headers in a csv file
   Output, obtained by executing the code in Parent folder, with the execution steps P1, P2, ... P16:         
         Replace headers in a csv file
   Output, obtained by executing the code in Child folder ("MyChildFolder"), with the execution steps C1, C2, ..., C19:            
         Replace headers in a csv file

============================================

 

 

 

=================================================================================