Hello World!!! It’s JITHU….. Welcome back to the day-8 of your programming life. As you know that programming is the key skill nowadays, But why only python as it simple and good for the beginners, That’s it??? Not really Because it consists of a lot of rich libraries that make our work a lot simpler.OK let me stop this and dive into our DAY-8 Tutorial.
DATA DATA DATA………. Today the term data most used word in the industry. And coming to Python it is a deadly combination, with data. Actually, Python is preferred to deal with the complex data. So today the most used language in DATA SCIENCE is python.
What is Data?
Data is the combination of Qualitative[descriptive data] and Quantitative[numeric data] variables. Actually, the data is in an unstructured format.
What is information?
Information means the arrangement of data in sequence so that it could give the meaning. Here there are 2 things data, structure.
Define Data Structure?
As simple as The data that is arranged in a structure so that it can be used for the future purpose is called data structure. 2 types of data structures. They are…
1] Linear Data Structure[Arrays,Queue,Stack,Linked List]
2] Non-Linear Data Structure[Trees, Graphs, Heap…….]
Python Data Structures:
As python is the special programming language it has 4 special Data Structures. They are
As These are vast topics I will cover only one in each post Today lets cover about List.
What is a list?
List is a Dataset that supports both the homogenous and heterogeneous type of data. Lists are mutable, a list opens with square brackets and with ends with a square bracket. a list is a container in which the items are separated by commas[,].
Note: Traditional arrays cant be created in python.
Types of Lists:
A List without any element is called Empty Set.
A List that containing only integers is called Numbered list.
A list that contains only Strings is called String List.
A list that contains both the integers and String type data is called Mixed List.
A list that contains integers, Strings and Other lists are called as nested lists.
Basic Operations on List:
List of Methods:
To add an element at the end we use append method. SYNTAX: list.append(obj)
To add all elements of a list to another list. SYNTAX: list.extend(obj)
To count how many times the in word is used in the given list. SYNTAX: list.count(obj)
Returns the lowest index where the given word is found. SYNTAX: list.index(obj)
Insert the object into the list. SYNTAX: list.insert(index,obj)
Basically, used to delete the last obj in the list similar to stack. SYNTAX: list.pop()
Used to remove any element in the given list. SYNTAX: list.remove(obj)
Used to reverse the elements in the list. SYNTAX: list.reverse()
Used to sort the elements in the list. SYNTAX: list.sort()
Ok, Wizards I wanna go to bed. Let’s continue tomorrow on the Tuples. GOOD NIGHT.