
Python Functions - W3Schools
Information can be passed into functions as arguments. Arguments are specified after the function name, inside the parentheses. You can add as many arguments as you want, just separate them with a comma. The following example has a function with one argument (fname).
Python Variables - W3Schools
Python has no command for declaring a variable. A variable is created the moment you first assign a value to it.
Python - Global Variables - W3Schools
Normally, when you create a variable inside a function, that variable is local, and can only be used inside that function. To create a global variable inside a function, you can use the global keyword.
Python Passing a List as an Argument - W3Schools
You can send any data types of argument to a function (string, number, list, dictionary etc.), and it will be treated as the same data type inside the function. E.g. if you send a List as an argument, it will still be a List when it reaches the function:
Python Arrays - W3Schools
Note: Python does not have built-in support for Arrays, but Python Lists can be used instead. Arrays Note: This page shows you how to use LISTS as ARRAYS, however, to work with arrays in Python you will have to import a library, like the NumPy library .
Python For Loops - W3Schools
The range() Function To loop through a set of code a specified number of times, we can use the range() function, The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.
Python Strings - W3Schools
Strings in python are surrounded by either single quotation marks, or double quotation marks. 'hello' is the same as "hello". You can display a string literal with the print() function:
Python Specify Variable Type - W3Schools
There may be times when you want to specify a type on to a variable. This can be done with casting. Python is an object-orientated language, and as such it uses classes to define data types, including its primitive types. Casting in python is therefore done using constructor functions:
Python Classes and Objects - W3Schools
To understand the meaning of classes we have to understand the built-in __init__() function. All classes have a function called __init__(), which is always executed when the class is being initiated. Use the __init__() function to assign values to object properties, or other operations that are necessary to do when the object is being created:
Python Numbers - W3Schools
Python Numbers. There are three numeric types in Python: int; float; complex; Variables of numeric types are created when you assign a value to them: