Data handling in python

deepalishinkar1 386 views 13 slides Oct 10, 2021
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

Data types in python


Slide Content

Data Handling

Data Types Each and every value we enter in a variable have a data type Which is provided by python interpreter as according to data A=12 variable Each value have a data type which is stetted by python interpreter

Data Types Numbers String List Tuples Dictionaries SET Boolean

Data Types:Numbers Complex 12+4i

String Collection of characters and sequence of characters A=“Deepali” Variable should be in Single quotes(‘Deepali’) Double quotes(“Deepali”) Multiline values should be in Triple double quotes(“ “ “)

LIST Ordered Sequence Contain items Homogeneous (same) Hetrogeneous (different) Flexible data type Widely used Changeable(Item can be alter)

LIST declaration F=[1,2.0,”Deepali”] Items enclosed within Square brackets Comma (Separator)

Tuples Ordered Sequence Unchangable (Tuples can not be altered) Tuples uses to protect the data Contain items Homogeneous (same) Hetrogeneous (different)

Tuples declaration f=(1,2.0,”Deepali”) Comma( Seperator ) Items enclosed within in parenthesis

Dictionary declaration Contains a key : value pair F={“Rohan”: “ Cycle”,”Satyam ”: “Car”} Items enclosed with curly brackets Comma( Seperator for key:value pair)

Dictionary Unordered sequence Contain key values pair Huge amount of data Code optimization Retrieve values from key

SET Well defined collection of item f={1,2.0,”Deepali”} Items enclosed within curly brackets Comma (separator)

Boolean True or False Declaration: Bool1=True Bool2=False