0% found this document useful (0 votes)
15 views5 pages

Python (Unit-1, Chap-2, Part-1)

The document discusses different variable types in Python like integers, floats, strings, lists, tuples, dictionaries, sets and Boolean values. It also covers variable naming rules and conventions in Python as well as implicit and explicit type conversions. Implicit type conversion is done automatically by Python while explicit type conversion requires using predefined functions or constructors.

Uploaded by

ronaksarvaiya2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Python (Unit-1, Chap-2, Part-1)

The document discusses different variable types in Python like integers, floats, strings, lists, tuples, dictionaries, sets and Boolean values. It also covers variable naming rules and conventions in Python as well as implicit and explicit type conversions. Implicit type conversion is done automatically by Python while explicit type conversion requires using predefined functions or constructors.

Uploaded by

ronaksarvaiya2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

M T WT F S S

Page No.: O
Avo YOUVA
Date:
Gfoy4l

#Bultein dada tpes


Numexica Tupesintegon numben's (en s,c3oo)
Float i Cloatina-poid humjens,4-900l,2Ses)
Camplex Comples Namben Ceg. 3+ 4j)
Sequenca Ipesihanat
Types Minuv
Srings Cea hello
istListsordeed Collecn.db items(ijz,37)
tuplei Tuplas,immutabe ordned Celleetian of items.
Ce. CI,z))
Mapping Typ
Cea fname'; 'Mawa,age'eísy)
tosTa Set Tupesu Anhaaihon watl
-Set : sets, epresemteaur tmavde Callechon
of unique elements (eg. lL,223
ats immutabeBes
trozenSet Fazen Sets

Boolean Tupe
boolBablaan Values represents tuth alus
-
False)

NoneType
None Represents
a Value
use help
(var_name)
MT W
Page No:
YOUVA
Date:

ch2Vaniab lasAnd Eapressiog


# Vaniabla
J s A Vcniabla in Pythan. is a sgblie name
Hhat efens toaVaues
IA's ikea labe adtached toa peskeudar
peiceofdaa im the Computer'smemory
Uaniablas allonos to share 'ard manipulate
storeard
daa dlnawnielay
Name =Mnuv

Tython.
Vaniabe
s Case
Name
Sensiive
is not
thee forea
the Same
Same as
name.

hVoniables aze
azS Creaded by assigning a

Nodue to thenm Uing=


iVolue wing peato
# bresston Vaniablo Names
F Venlabla nanes Can ConBatn Leltens (a-zjA-z),
digits(o-a) and unclanscoxesC-)
vaniable name' cannol Stant coithadigit
Vaniablehames aze Case Sensiive
Cannotbepythomkey oords
wosds. SuchasiSelse for LIhia etc)
Can not Contu'n Space Special Charactons
ike #,$,2ete
is09= ue
hame = 'Mnuvg
Page No.: 2
YOUVA
AVuOY Date:

keyoords
keiyuoxds aneveserved úTls that hae
ohithin
Special meaninqs ond puxpose
1cia
the
key
Jangun
idord Cannót be usec as Uauicble
hames onidantifienslha
keyords ane pedefme
Sesives,
Sesive speciic hanchons in pathen

The lict o keywrds ae as


False class
NonedContinue lobal opass
xue N def
and del impost retun
as eie in ty
assert
Except lambdanaoith
aait finally nanloca yield
break

ape Canvexsiona
Theprocess of onventing the Valusa
k of onedatypeto anothez data
tupeis Calledype Convension
Tmplia
Exflcit
MT W T F S S
Page No.: 13
AVUO YOUVA
Date:

|D ImplicitL Tupe Cornvensian.


ythanautoneico Canvents one ata
to anathen data tpe..
This procesdoesh'tneod any usen
invobment

hum flo = |.23tiaC - fo


hum Con = hunint tAunse num_Clo

Rthon aloaug Canents Sinallen dat typs


t langan data types to aueid the loss

numin =l23
hum sty=423"

numned = hum t humsr

In situalicn Lika this Pthon is nat


abla to ConVen sion thee fore
Epiet ConvenSio s use ftype
is also a
Cishing khoh
M T W TF

Page No.: 4
Date:
16/0y/24 YOUVA
# Epiett Type Convension
claalso kncr n as type Cashing, is the
pxocess of Conveninsa alie fsom
One data type to anothen dat type
tunchan or
explieity uya predafred funcions
Con'strttor
This Canvension is dane intentonolu bu
the pragrammen
*Suntai
Krequreddadatype> (expesien)
*egll
numnt
hum Str
l23 inteyn
m hneuo=int
e - (num-strt humint

You might also like