Python Listsupdated at May 10, 2024Lists are used to store multiple items in a single variable.Lists are one of 4 built-in data types in Python used to store collections of data,the other 3 are Tuple,Set,and Dictionary,all with different qualities and usage.Lists are created using square br... |
Python Setsupdated at May 09, 2024Sets are used to store multiple items in a single variable.Set is one of 4 built-in data types in Python used to store collections of data,the other 3 are List,Tuple,and Dictionary,all with different qualities and usage.A set is a collection which is unord... |
Python Tuplesupdated at May 09, 2024Tuples are used to store multiple items in a single variable.Tuple is one of 4 built-in data types in Python used to store collections of data,the other 3 are List,Set,and Dictionary,all with different qualities and usage.A tuple is a collection which is o... |
Python Dictionariesupdated at May 09, 2024Dictionaries are used to store data values in key:value pairs.A dictionary is a collection which is ordered*,changeable and do not allow duplicates.Dictionaries are written with curly brackets,and have keys and values:Dictionary Items.Dictionary items are ... |
Python While Loops/For Loopsupdated at May 09, 2024The while Loop.With the while loop we can execute a set of statements as long as a condition is true.The while loop requires relevant variables to be ready,in this example we need to define an indexing variable,i,which we set to 1. .The break Statement.Wit... |
Python Functionsupdated at May 09, 2024A function is a block of code which only runs when it is called.You can pass data,known as parameters,into a function.A function can return data as a result.Creating a Function.In Python a function is defined using the def keyword: .Calling a Function.To c... |
Python Modulesupdated at May 09, 2024What is a Module?.Consider a module to be the same as a code library.A file containing a set of functions you want to include in your application.Create a Module.To create a module just save the code you want in a file with the file extension .py:Use a Mod... |
Python Polymorphismupdated at May 09, 2024The word "polymorphism" means "many forms",and in programming it refers to methods / functions / operators with the same name that can be executed on many objects or classes.Function Polymorphism.An example of a Python function that can be used on differen... |