• Python Built-In Functions

    Python Built-In Functions

    Python Built-In Functions Table Of Contents: What Is A Built-In Function? Different Built-In Functions. (1) What Is A Built-In Function? A built-in function is a function that is already available in a programming language, application, or another tool that can be accessed by end users. The end user can directly call the function to use it. But you must know how the function works. (2) Different Built-In Function? Python provides total of 69 built-in functions. Let’s discuss them one by one with examples. (1) abs( ) Definition: The abs( ) function returns the absolute value of the specified number. Syntax:

    Read More

  • Python User Defined Functions

    Python User Defined Functions

    Python User Defined Function Table Of Contents: What Is A User Defined Function? Creating User Defined Functions. Calling User Defined Functions. Function With Return Type. Parameterized Functions. Default Arguments. Keyword Arguments. Variable Length Arguments. Pass By Reference Or Pass By Value. (1) What Is A User Defined Function? A function is a set of statements that take inputs, do some specific computation and produce output. The function which is written by the user is called User Defined Function. The function which comes by default from the programming language are called inbuilt functions. The sole purpose of creating function is to

    Read More

  • Python Dictionary

    Python Dictionary

    Python Dictionary Table Of Contents: What Is A Dictionary? How To Create A Python Dictionary? Accessing Dictionary Elements. Looping Through Dictionary. Adding Elements To Dictionary. Updating Values In Dictionary. Removing Items From Dictionary. Copying A Dictionary. Deleting A Dictionary. (1) What Is A Dictionary? Dictionaries are used to store data in key:value pairs. Key is used to uniquely identify each value. Dictionary preserves the order of the elements stored. Dictionary do not allow duplicate elements to store. Dictionary is mutable in nature, that means we can add,remove or update the values of Dictionary without creating a new memory location. (2)

    Read More

  • Python Sets

    Python Sets

    Python Set Table Of Contents: What Is A Set Data Type? How To Create A Set In Python? Accessing Set Elements. Adding Items Into A Set. Removing Elements From The Set. Mutable Nature Of Set. Looping Through Set. Joining Sets. Deleting A Set. (1) What Is A Set Data Type? Sets are used to store multiple items in a single variable. Set can store heterogeneous elements inside them. A Set is an unordered collection data type, that means set will store your elements in a random order. Set is a mutable data type, that means you can add, remove, update

    Read More

  • Python Tuples

    Python Tuples

    Python Tuples Table Of Contents: What Is A Tuple? How To Create A Tuple In Python? Immutability Nature Of Tuple. Accessing Tuple Items. Tuple Membership Test. Updating A Tuple. Unpacking A Tuple. Joining Tuples. Slicing A Tuple. Deleting A Tuple. (1) What Is A Tuple? Tuples are used to store multiple items in a single variable. Tuples can store heterogeneous elements inside them. Tuples keep elements insertion order as it is. Tuples can store duplicate elements inside them. Tuples are immutable in nature, meaning that we cannot change, add or remove items after the tuple has been created. (2) How

    Read More

  • Python List

    Python List

    Python Lists Table Of Contents: What Are Python Lists? Creating A List In Python. Accessing Elements From the List. Getting The Size Of The Python List. List Membership Check. Adding Elements To A Python List. Removing Elements From The List. Reversing A List. Sorting A List. Joining A Lists. Copying A Lists. Slicing A List. List Comprehension. (1) What Are Python Lists? Lists are used to store multiple items in a single variable. Lists are created using square brackets [ ] and elements are separated using a comma ( , ). Lists need not be homogeneous always which makes it

    Read More

  • Python Strings

    Python Strings

    Python Strings Table Of Contents: What Is Python String? Data Type? Multiline Strings Array Of Strings Looping Through String Length Of String String Membership Check String Slicing String Updation String Concatenation String Repetition String Formatting (1) What Is Python String Data Type? The string is a sequence of characters. Generally, strings are represented by either single or double quotes in Python. A String data type can be of any length. Starting from an empty string to a paragraph. Examples str1 = "" #Empty String str2 = "A" #Single String str3 = "Hello" #Single Word String str4 = "Hello World" #Double

    Read More

  • Python Numbers

    Python Numbers

    Python Numbers Table Of Contents: What is Python Number Data Type? Types Of Python Numbers. Number Type Conversion. Mathematical Functions. Random Number Functions. Mathematical Constants. (1) What Is Python Number Data Type? Number data types store numeric values like 45, 66.87, 0.452, etc. They are immutable data types, which means that changing the value of a number of data types results in a newly allocated object in memory. In Python you don’t have to declare the type of the variable, you only just need to assign the value to the variable. Python will automatically assign it’s type. Example-1 var1 =

    Read More

  • Python Loop Control Statements

    Python Loop Control Statements

    Python Loop Control Statement Table Of Contents: What Is Loop Control Statement? Break Statement. Continue Statement. Pass Statement. (1)What Is A Loop Control Statement? When you want to get out of the loop in between you can use Loop Control Statements. Loop will run as many times as the condition is satisfying. But, python provides us the ways to skip some iterations or stop the execution in between. (2) Break Statement The Break statement stops the execution and brings the control out of the loop. You put some conditions and write a Break statement inside the loop. If that condition

    Read More

  • Python Looping Statements

    Python Looping Statements

    Python Looping Statements Table Of Contents: What Are Looping Statements? Types Of Looping Statements. while Loop. for Loop. Nested Loop. (1) What Are Looping Statements? In the programming world, your code executes sequentially. That means, the first statement in a function is executed first, followed by the second, and so on. There will come a situation where you need to execute a block of code several times. At that time you can use, a python loop statement that will execute a statement or group of statements multiple times. (2) Types Of Looping Statements? while loop for loop Nested Loop (3)

    Read More