Python Tutorilas | Python Interview Questions Session - 1 | by Durga Sir
Пікірлер: 53
@kvgraphics157 Жыл бұрын
Q1: DIFFERENCE BETWEEN "IS" AND "==" OPERATOR IN PYTHON. IS -->is operator is used to refering the two variables to the same object(Simplt it is identity operator.) == --->is used to compare two objects(simply it is a Equality operator) Q2: TERNARY OPERATOR or CONDITIONAL OPERATOR: Way of writing simple if/else statements in a single line(with 3 orguments). syntax: x= a if (condition) else b if condition is True x=a otherwise x=b Q3: DATA TYPES: 1)int 2)float 3)str(string) 4)complex 5)bool 6)list 7)tuple 8)dict 9)bytearray 10)bytes 11)range..etc Q4: MUTABLE AND IMMUTABLE OBJECTS Mutable: *posible to do modifications once creation of an object. ex: list, dictionary, set . Note: if we try to do modifications we will get an "type error". Immutable: *Imposible to do modifications once creation of an object. ex: Tuple,string,range. Q5: IN PYTHON WHICH OBJECTS ARE MUTABLE AND WHICH OBJECTS ARE IMMUTABLE? Mutable Objects: 1)list 2)dict 3)bytearray 4)set..etc Immutable Objects: 1)int 2)float 3)str(string) 4)complex 5)bool 6)frozenset 7)bytes Note:All fundamental data types are immutable. Q6: **** DIFFERENCE BETWEEN LIST AND TUPLE: **** List: -->List is group of comma seperated values with in square brackets and square brackets are mandatory. * List is an mutable object simly we can do any kind of modifications. ex: l=[10,20,30] --->List riquires more memory space. --->List objects are won't reusable. --->The performance of list is low, i.e, the operation of list object take more time. ---> Comprehension concept is applicable for List . --->List objects are ""unhashable type"" . so we can't store in set and in dict as keys. ex: s={10,20,30,[40,50]} print(S) o/p: TypeError: unhashable type: 'list'. ex: s={[40,50]:"jaya"} print(S) o/p: TypeError: unhashable type: 'list'. --> Unpacking is possible in list but packing is not possible . Tuple: --->Tuple is a group of comma seperated values with in a paranthesis and paranthesis are optional. *Tuple is an immutable object and we can't do any kind of modifications once creation of objects. ex: t=(10,20,30,40,50) t=10,20,30,40,50 ---->Tuple riquire less memory space. ---->Tuple objects are reusable ---> The performance of list is high, i.e, the operation of list object take less time. ---> Comprehension concept is not applicable in Tuple. ---> Tuple objects are """hashable type""" so we can store in set and in dict as keys. ex:s=(10,20,30,[40,50]) print(S) o/p: (10, 20, 30, [40, 50]) --> both packing and unpacking is possible in tuple. Example for memory storage in list and tuple: import sys l=[10,20,30,40,50] t=(10,20,30,40,50) print("The size of List is :",sys.getsizeof(l)) print("The size of Tuple is:",sys.getsizeof(t)) o/p: The size of List is : 88 The size of Tuple is: 80 Example for object reusable in List and python: l1=[10,20,30,40,50,60,70,80,90,100] l2=[10,20,30,40,50,60,70,80,90,100] t1=(10,20,30,40,50,60,70,80,90,100) t2=(10,20,30,40,50,60,70,80,90,100) print(id(l1)) print(id(l2)) print(id(t1)) print(id(t2)) o/p:2869878896000 #list object take different object location. 2869834003584 2869874051648 #tuple object use same object location. 2869874051648 😀😀GIVE LEFT AND RIGHT TO INTERVIEWER IF ASK THESE QUESTIONS....
@venkatathanooj3 жыл бұрын
Thank you sir for your love towards students for providing always best concepts through videos at the correct Time. I am waiting for the part-2
@Anand_Acharya2 жыл бұрын
Sir you are amazing... Your methods are directly going in my mind.
@mareboinaravi52723 жыл бұрын
He is a legend. That's why we still(2021) watching his videos and joining ur institutes.
@venkatanaveen48314 ай бұрын
2024
@govardhanreddy6903 жыл бұрын
ThankYou sir I am waiting for part-2
@tapanraysannwal7307 Жыл бұрын
Excellent teachings method.
@shailajadavangave452 жыл бұрын
Thanks sir wonderful content
@srinudosapati92623 жыл бұрын
Well said sir......!
@mahipatel12 жыл бұрын
You are the best sir
@gowthamkr94332 жыл бұрын
great video
@bhushanwagh71923 жыл бұрын
I'm waiting for 2 nd part
@suriyaannadurai24053 жыл бұрын
I'm waiting 2 nd video
@princevineet16612 жыл бұрын
Tqsm sir
@pallarajasekhar Жыл бұрын
thanks sir
@prabhunathjha3372 Жыл бұрын
Where is Durga sir now?
@jaybalumamacreation83404 ай бұрын
Sir plzzz send all python video topic
@DurgaSoftwareSolutions4 ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@dpbekkanti83663 жыл бұрын
sir...plz upload django interviw question
@DurgaSoftwareSolutions3 жыл бұрын
Hello Bekkanti. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@artcraftsdecoration84542 жыл бұрын
What is meant by left n right.. Sir said in all session 😀
@DurgaSoftwareSolutions2 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@firojkhan16733 жыл бұрын
love you ruby
@rakeshnagarajan77013 жыл бұрын
Is there any blog. It's hard to hear your voice and slang
@DurgaSoftwareSolutions3 жыл бұрын
Hello Rakesh. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@GauravSharma-bl3xq2 жыл бұрын
sir, please provide the pdf of content and wonderful experience with learning for you
@DurgaSoftwareSolutions2 жыл бұрын
Hello Sharma. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@muskaangupta4915 Жыл бұрын
Ofiln clss kh h apki fees ky h or
@mainuddinali95613 жыл бұрын
2nd part, sir
@DurgaSoftwareSolutions3 жыл бұрын
Hello Ali. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@kota117.2 жыл бұрын
Sir can we get those interview questions and answers pdf?? Plzz it's a request to share those
@DurgaSoftwareSolutions2 жыл бұрын
Hello Praneeth. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@MrRahulmaitra3 жыл бұрын
>>> t2 = (10,20,30,40,50,60,70,80,90,100) >>> t1 = (10,20,30,40,50,60,70,80,90,100) >>> print(id(t1)) 140411054539552 >>> print(id(t2)) 140411054539984 for same values I am getting different id location....please explain(both python2 and 3 same output)
@DurgaSoftwareSolutions2 жыл бұрын
Hello Rahul. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@himanshusoni15122 жыл бұрын
Try to print on same go like print(id(t1), id(t2)). Each time you hit run, address space changes thus two different addresses you are getting.
@rahultiwari92563 жыл бұрын
Sir can you please share the file as well?
@DurgaSoftwareSolutions3 жыл бұрын
Hello Rahul. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@IndoriTrader3 жыл бұрын
set data type is mutable and immutable.
@lakshmiv39703 жыл бұрын
Mutable
@MrMeghesh2 жыл бұрын
I want pdf file for those questions and answers
@DurgaSoftwareSolutions2 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@bheemi-s6u3 жыл бұрын
Sir I want pdf sir
@DurgaSoftwareSolutions3 жыл бұрын
Hello Bheemireddy. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@bheemi-s6u3 жыл бұрын
@@DurgaSoftwareSolutions sir already mail to this durga soft
@bheemi-s6u3 жыл бұрын
Pdf is free or cost
@DurgaSoftwareSolutions3 жыл бұрын
Hello Bheemireddy. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@ajtech14403 жыл бұрын
sir, where is the pdf of that session
@DurgaSoftwareSolutions3 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@bheemi-s6u3 жыл бұрын
@@DurgaSoftwareSolutions I want. Pdf python interview questions
@shubhamdubey91813 жыл бұрын
Sir plzzz upload second part....🙏
@DurgaSoftwareSolutions3 жыл бұрын
Hello Shubham. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28