0% found this document useful (0 votes)
16 views4 pages

?python?interview Series (Part-1)

Just part 1 not anything else.

Uploaded by

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

?python?interview Series (Part-1)

Just part 1 not anything else.

Uploaded by

hqndadwp3201
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
PYTHON INTERVIEW) Choesty ONS Part -1 1). [eahar type oF Tanguage jy Pyghon? Programming ov Scyletiag! > Fython WN capasie of scripting , but In general purpose Programming Janguage 2) [Yow 1s Pychon an Interpreted 1anguage : > fin interpreted Janguage 3s any programming language vnich is not in machine level code before yuntime. Thereteve, python is an interpreted Janguage. Page CuNneon TEC RG RAM NOTES YILLERY. 3). [whet i's Per 8 7 # name PEP stands for python Chhanument proposal: It is 4 ste of yujes thar spedhy how t0 format python code for maximum yeadabtlity - wl you is memory manages In Pypron 9 Pe Memesy management In python js managed by python private heop Spar. Ay) python Objects and dard Struttures Are located sn privete heap. The Programmer ches not have access 70 PAIS pyivate heep Tht python Interpreter fakes care of instead. * fru allocation of hep spau for python objects js clone sy pythons memory manager. Prt cove API glues Qecess 40 tome drole for re Programmer 70 Code, ATUL KUMAR CLINKEDIA ). © Fyrhon also has an inballt garbage collection uohich recycles all the unused memory and $0 for that i+ can be made avaiable fo the heap Space. 5): [Whar i's namespace In Pyrnon? 7 py namespace 7s naming System used 40 Mekt Sure that names are wnlgue 4o avoid naming conflicts Atul wumpAk (LissKEOIM) TECE RAM" KLOTES GALLERY lahat axe Python modules? Name sone commonly used budlt in_modwes in Pythen ? 6) > Fyrnon medies ave Files con¢elning python lode This Code can be Funions Classes or Yariables. F python modules ia “Py File containing executable Code .« Some of the commonly used bedit-in modules are: os 0 Sys » datatime «json - 7). [buhar Gre focal and 9 /obar Warianje in Python? | > Global variable :- Variables declared Outside a function oy In globe space are Caled globe! Yarlables: These Variables can pe accessed by any Function In the Pregvam. Local Variables :- fing Varviabte declared inside a function is known os @ focal Variable + This Variable is present }n phe Jocel and not in the Hlobay Space: SIPs Pyrron case Sensitive ? > Yes, pyshon 7S @ Case sensitive language. 91. [Kdhet Is 7gPe Conversion Tn Poron? P Tdpe conversion yefers 40 phe conversion of One datg type Indo anogher Pt eX NEC ORE eC eee 10). [TeTnaentation veguised In Python? | > Ihdenration js necessary for python. It spedFies a bok of code . #1) Code within Joops classes function ete within an Indented bros. St Is usuety dene using four spac chavauer. jf your code }s not indented necessarily - Jt will not execure accurately and WI) thyol? eyyorl as well. [lahat 972 Lunerians In Pythons 2] > FF Funution Is a block of Code which IS Exetuted only whtn if is cwled. Te define a pyphon function, qhe def key Word js used. def NewFun( > print (“iri ") 17]. > —Init_ is a method ov Conspyuceor In python. This method is autor wt cally called to etocete memory (ding new object of & Class js Created. M1 Classes have the —Init_. method. for eg!- Class EmP: deb_init_ (ser, name); SUL Name = name E1= Emel *xy2 “) Print (Es. name) 19). Iedhat is lambd9 Function 7 fn anonymous Function 75 knotdn 46 @ lambda Function. Prt funcrion can have ang number oF pavamerert but have gust one Statement. Q= jaonbd9 X,Y: x+y Print (acs ,¢)) ATUL Koma LINKEDIN): su). [thar i sere In Python 2 > Self is an Insfane oy an objet oF @ class. Jn python, this ts explicitly included aS the Frrst paramerer. This is not the case In fava where M's optional» fr helps Jo differentiate Lerween the methods Qnd ettyibutes of a Clots with Jocal yarichles. Tre sep Variable in phe init method yofey 4° the newly created object wile in ether method*, ft xefeys fo the object” 1dho- Method toGs called. Atul womak (UNKEDIN) TELEGRAM” RITES GRUERY. 15)-[Khet ave on Ttevayors 7 7 Drevators are objects which can be fraversed phough or itevated upon.

You might also like