• 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