[0:10]Hello, this is Kiran here. Today we are bringing one of the Python interview. I have Kishori with me, and she's in the final year right now. She's still studying. So we'll be taking interview step by step. First core Python, then Django, and then SQL, and many more things we'll be asking. So, those who want to give same interview like Kishori, can put your name in the form given in the description below. We have a lot of interviews coming in for Python, and it's a good technology, booming technology. But one more thing I want to tell here, your work is not to judge Kishori, but judge yourself. This interview is for you, not for me, not for her. So whenever I ask question, you pause and try to give answer by yourself. Don't start judging me or Kishori, that's not your work. Your work is to judge yourself. So let's start with this. Welcome, Kishori.
[1:06]Let me go through your resume first. So Sharad Institute of Technology College of Engineering, right? Ichalkaranji. So you're learning there as a B, correct?
[1:23]No, sir, from different institution. No, but, but same city, right? Yes, sir. No problem. So be cool, okay? You are just learning and you are coming to YouTube. It's really good thing for us. You're learning Python I think here, right? Yes, sir. Okay, great. So what is this? I see in your resume that, just a second. So in your resume I can see the tools that is Jupiter notebook. You have used, then VS Code you have used, uh, MySQL, Google Colab, and Tableau. Yes, sir. Correct? Okay. So can you explain me each one of it? What is Jupiter notebook? Sir, Jupiter notebook is used for the Python programming. That is, we use import the data set from online and we have to do operations on that. Okay, great. What is VS code? Sir, VS Code is one of tool for Python. We can do courses on VS Code. We can do some operations, we can do coding in VS Code, right? Yes. Eclipse? Uh, sir Eclipse is a Is a tool to develop a code. It's a IDE, right? They are all the tools for coding languages. Okay. When you use Eclipse in final year means college or So they are taken in practical sessions. What is Google Colab? This is also for data analysis user. What is Tableau? Sir, they are all also like that. Okay. So what I mean to say from this question, whatever you write in resume, you answered correctly for data analysis. Whatever tools or whatever, whatever single word you write in your resume, you must know. So that was the only intention behind this question. So that's great. You know, what is MySQL? MySQL is a database. Correct, it's a database. Correct. Next, you wrote in your resume you know C, C++, Java, MySQL, Python, data structures, and many things, right? Yes, sir. Okay, great. So let's start with the core Python, okay? Yeah. So my first question is, what is the difference between list and tuple? List is a comma separated values within a square bracket, and the tuple is a comma separated values within a parenthesis. The list is immutable and tuple is a immutable. Perfect, perfect. Yeah. You can have tuple inside list? Yes, sir. List inside tuple? No, sir. No. What do you think, guys? List inside tuple is possible or not? Write down in comment. Okay. Next. Do you really think that list inside tuple is not possible? Sir, I'm a little bit confused. You are confused. No problem. You can directly tell to interviewer that I'm a little bit confused. But I can assure you, I can confirm you that we can have tuple inside list, right? Yeah. So directly tell to interviewers, be frank, okay? Don't hesitate, don't worry. Interviewer always want you to be comfortable. Interviewer always want to take you in his company. First of all, try to understand that, okay? They don't want to confuse you. Next question, what is dictionary? Dictionary is a key value pair, elements which are stored in the curly braces. Okay. How to iterate dictionary? We can use several methods. That is, first is keys, second value, third atoms. When you have to iterate both keys and values, we can use the atom methods. What will happen with the keys method? Only keys are iterate. Iterated, okay. And what is the use of values? Only values that can be iterated. Along with keen, but does not display. You know, oops concepts? Yes, sir. So what are the oops concepts available in Python? Sir, there are four concepts, pillars of the oops concept, that is inheritance, polymorphism, encapsulation, and abstraction. Okay, what is abstraction? Hiding the data. Hiding the data. If you hide the data, then what's the use of it? Means hiding the main procedure behind that the code, that is hiding. Yeah, correct. Do you think that multiple inheritance is allowed in Python? Yes, sir. Allowed? Yes, sir. Okay. Multiple inheritance is not allowed in not supported in Java. But in Python it is allowed. In Python, it is allowed. Yeah, so I'm asking Python, you are very correct. So, let's say if two super classes are there and one subclass. You got my question? Yes, sir. Super class also have a function with name something and another super class with function. Is that okay? Yes, sir. Correct? Okay. Now, in subclass. Okay, so let's come to the paper. If there are super classes, two super classes and one subclass. Here also function X, here also function X. Which function will come here to subclass? Sir, both functions are. Both will come? Yes, sir. No, the answer is first class function will be coming. You will be writing like this, right? X colon colon something Y, A, right? The first one. So this question many time people ask. Next is like, can we change global variable? Yes, sir. In Python? Yes, sir. How? By using a global keyword. By using a global keyword. Great. What is init function? Init is a magic function that is that is in the constructor, that is one of constructor. Self is a first parameter, default parameter of init function. Init function automatically calls when we create an object. That means it's a constructor, you're saying. So init function gets called automatically, right? What is self? Self is a first default argument of init function. We can use any name instead of self. Do you know private? Yes, sir. What is that? Private members means we cannot access outside the on other function. So you need to write private word over there? No, sir. By giving two underscore, before the before the function name or the variable name. How to implement inheritance in Python?
[8:14]Sir, child class is inherit from the parent class. How to write child class? By giving the in parenthesis, in parenthesis, giving the parent class name. Can we write two class name there? Yes, sir. That is what I explained you like multiple inheritance. Okay. In Python, which topic you are more comfortable? Sir, all are. All, you are comfortable in all. You know threading? No, sir. In core Python, multi threading? No, sir. No, you have, you have not explored it? Okay, what is decorator? Decorators are the function which calls another function as an argument, modify it, and then returns it. Okay, can we have, can one function return another function? Yes, sir.
[9:08]Okay. Can one function return multiple values? Comma separated? Yes, sir.
[9:16]Okay. If one function is returning comma separated multiple values, then where it is getting stored in the form of list? In the form of tuple. In the form of tuple, right? List or tuple? Tuple.
[9:31]Why we can say that tuple is immutable? Because we can't change the elements in the tuple. Tuple is faster or list is faster? Sir, list is a faster because it is a heterogeneous. Really? You guys think that list is faster than tuple or tuple is faster than list? Write down in comment. So as you go on writing comments, I'll read those and I'll answer. What Kishori is saying might be correct, might be wrong. So this time I'm not giving so much analysis about her questions and answer, but she is most of the time correct. Okay, so that is the hint I can give you. But you write whether list is faster or tuple is faster. And you will be seeing that in Google, okay, later some time once you finish this interview, okay? So you might be correct, you might be wrong. Next is like, can you explain me for loop in Python? Yes, sir. What is that? For loop is used for iteration or a specific condition. We can use for loop as a for in temporary, temporary variable in the sequence. By using this syntax, we can use the for loop. Can we have for inside for? Yes, sir. Can we have two for loops? Means for inside nested for is it possible? No, sir, I can't about this.
[10:53]Okay, you never heard. But inside one for loop, another for loop also can be there. Understood? For pattern programming or any programs, it is needed. Okay, so come ahead. Why we do slicing in Python? Sir, fetching multiple elements from the sequence, any sequence. Fetching multiple elements. Can slicing be applied to string? Yes, sir. For list, map, dictionary? Yes, sir. So slicing can be used anywhere, you are saying. Correct? Okay. Is there array concept in Python? No, sir. No array? We cannot have array in Python? Think about it. Yeah, you are just college graduate, so you can give me any answers, that's not a problem. So what do you guys think, is there array in Python or not? Just think. Okay, you know exceptions? Numpy array is present in Python. What is exception? Exceptions occurs when when code does not Whenever there is any abnormal condition in program, that time exception occurs. You know super class of all the exception? What? Exception base class. Yeah, it's a base exception. Okay. Next question is like, you know Python installation? Have you ever installed Python? Yes, sir. In which drive it is getting installed? C drive. C drive, in program files, right? Okay, good. Which editor you have used for coding Python? VS Code. Why not PyCharm? Sir, VS Code is more reliable than. I think VS Code is more reliable than the other tools. Okay. Can it be possible to assign multiple values to one variable? Yes, sir. Possible? No, sir. Means if one variable is there, A, can we assign multiple values to that variable? Yes, but first value is overrid with the second and the first value will collected by garbage collector. Okay. So you mean to say if I assign 10 values like 10, 20, 30 to A then last value will be considered? Yes, sir. Pakka? Yes, sir. Or it will become list automatically? In the form of tuple. Or it will give an error? You mean to say last value will be considered, right?
[13:48]Okay. How many memory is managed in Python? In Python, memory is managed by the Python memory manager. Python memory manager allocates the memory. And the garbage collector deallocates the memory. Means when we declare A is equal to 10 and again we declare A is equal to 20, then the 20 value overwrite on 10, and the 10 value considered as garbage value. What is is operator and double equal to operator in Python? Is equal operator is used for checking the two objects are equal or not. And the is operator is used for checking the reference variable of two objects are same or not. Okay, how to create constants in Python? There is no such pure concept as happens in C++ and Java. We can feel take the feel of creating constant by writing their variables name in capital letters. Okay. Is there any concept of global variable and local variable in Python? Yes, sir. How to define that? Sir, global variables are declared inside the class but outside the methods. And the local methods are declared inside the methods. Their scopes are limited, the specific inside the method. And the global variables are accessible over the class. What is complex data type in Python? Sir, complex, it is a combination of real and imaginary number. For example, 2+3j. Then 2 is a real number and 3j is a unreal number, that is imaginary. What is list comprehension? It is a brief way to to make and manipulate the list, sets and dictionaries. By comprehension, we can reduce the code.
[15:50]Okay. If you want to explore string class like how many functions are there in string class, what does string class do? What command or what function you need to use? We can use module just choices and by using the string dot ASCII, upper case, lower case, punctuations. No, like that. I want to see all functions in some class. How I'll get that help? Means, sir? See, you want to explore one class. Like, what is there in the string class, I want to see how many functions are there, what every function is doing. Sir, DIR method. Perfect. DIR help method. These methods will be helping you to explore the class. Correct? Yes, sir. What are the methods does string have? String, string is a class, right? So which functions does string class have? Concatenate. Add. Sir, add not. Add not in. Okay, what is indexing and slicing? For fetching the single element, we can use indexing. And for fetching the multiple elements from the sequence, we can use slicing. Okay, great. Why do you use zip function? Zip is a function of like merging, they can merge the two lists and returns in a tuple. What is import concept? Import is used for importing the modules, from that means one code is written in one module, which can be accessed from another module by using the import. What is the difference between syntax of list and set? Sir, list, list is comma separated values within the square bracket. And set is the comma separated values within the curly braces. Okay, only curly brace difference is there. Right? And what is the syntax for tuple? Sir, we can create tuple, means tuple is also comma separated values within the parenthesis. Can we create empty set? Yes, sir. How? By giving set name and the parenthesis.
[18:06]Okay, so it's initialization, right? It will call a constructor of set. Correct? Okay. Why do you use constructors? Constructor invokes automatically when we create an object. After creating an object, constructor can call. What's use of break and continue? For iterating, we can use break. And when we use break, the loop iterates itself. And then we use continue, the flow of the code is goes in the starting part. What is pass keyword? When to write pass? Pass is a placeholder which we can use for the future use. Full, keep on. That means if you don't have any implementation for any method, you just write pass, right? For not doing any error. It will, it will not. When we can't return anything in that function, so it can show an error. List is faster or tuple is faster? This is again I'm asking you. Once upon time also I asked. Again, what do you think? I think list is a faster. You are saying again list is a faster, right? Okay. Did you ever tried a pattern programming? Yes, sir.
[19:27]Hmm. What you did in that, what you practice? Sir, I have tried the star patterns of triangle.
[19:38]Hmm. So for loop inside for loop is used for that pattern programming. Okay. So my next question is, can we have unique values in dictionary or unique keys? Sir, unique keys. Unique keys. Can we add set inside dictionary? Set inside dictionary? Yes, sir. What's use of Django framework? Why to understand like?
[20:04]Django is a Python framework used for creating the web web applications. Very good. Django, I think you have not learned it, right? No, sir. If I want to give duplicate keys in Python, duplicate keys in dictionary, how to do that? Sir, duplicate keys are not allowed in dictionary. Pakka? Yes, sir. Okay, correct. What do you think? Python is best or Java is best? Sir, I think Python is a good and. No, I think when you are learning Python, say Python is best. Don't worry. Sir, but Java provides a strong database, as compared to Python. Database? No, Java don't provide any database. Python don't provide any database. Don't worry about that. Means JDBC there. So how to connect database in Python? Sir, I till I'm not. Oh, you have not learned that? Okay. How to create packages? What is valid package means in Python? Sir, from importing. Importing the method name and then.
[21:18]What is the pip command? Sir, pip. In Python, we can't install the all packages and libraries initially. So that we can use pip. Pip allows to install the various libraries, packages, additional in Python whenever we want to use. Have you ever tried NumPy? No, sir. Why do you use NumPy? NumPy is, it is a library which works or operate do operations on the arrays. Which does operation on arrays. How can we create object in Python? By giving the reference variable name. Why do we create object, basically? For calling the methods. Within the same class if you want to call, still you need to create an object?
[22:12]No, sir. Only one copy is for the one class. Means, we have create a many objects from for one class. What are the data types available in Python? There are several data types, like arithmetic, logical, assignment, boolean, special operator is there. What is special operator? Sir, is and in are the two special operators present in. Why they are called as special operators? Sir, they are used for the when you are declare the two variables, then A is equal to 10 and B is equal to 10, then A is B. It returns true. So it is the is operator special that defines the it the two objects value is equal or not. How to find address of object? Sir, by using ID function. What is the type function? Type function declare, means returns the type of data type of that variable. You declare one string, okay? S is equal to Kishori. And then type S, what, what it will print?
[23:31]It will print as string.
[23:46]Not type of string. Okay, Kishori, it will not print Kishori.
[23:55]You understood what I'm saying? S is equal to Kishori. Then I wrote type S, what it is going to print?
[24:31]Sir, it will print a string. Okay. So Python is open source or what? Sir, Python is open source. What's use of open source? Why it is open source? Sir, we can anyone can use. Anyone can use. Or anyone can modify? Means it's a platform independent, Python also, so. What is platform independent means? Create once and run anywhere, that like we can create a one code from any. Any operating system and then we can again want to execute, then you can execute on another OS. What's use of it? Why? Why it is good? Sir, it is good for it code reusability, provides the code reusability. Correct, code reusability. It saves the time, right? What is lambda? Sir, lambda is a anonymous function which is not named a function. It it makes code shorter. So its syntax is like dev keyword is not used for the initializing the lambda function. Lambda keyword is used for lambda in square bracket the expressions, variable name, colon, expressions. What is range and X range? Sir, in Python range. Range means what? Range means when we have to iterate the number, When you want to iterate or into generate? Iterate from given the certain condition with limits. Then we have used the range. Okay. What is pickling? Sir, pickling means Python objects converts into the byte stream. What is the difference between switch statement and nested if? No, sir. I don't have. Okay, nested it means it keep evaluating every if. Switch means it is you explore at home, okay? If there is switch in Python. Are you enjoying interview or not? This is first time you are facing a camera? Yes, sir, first time. Never in college also? No, sir. Okay. You gave any mock interview till now? No, sir. Not in institute also? One, sir, first time. One. How it was? Sir, it was very bad. So you improved after that? Yes, sir, I tried. Hmm. What is shallow copy and deep copy?
[26:56]Sir, shallow copy creates the new list of object. Taking the original taking the address of original objects, elements from the list, and the deep copy creates a new list. But the taking the reference. How to comment code in Python? By using hash. By using hash. What is for loop and while loop? What is the difference? Sir, both are used for iterating the elements. But when we have the certain condition, we use for loop. And there is no condition, then we will use the while loop. Okay. How to pass values to the function? How many ways are there? Or what are the ways available to pass values to the function? Sir, by passing the arguments, we can give the values. Hmm. If I want to swap two numbers, how you swap? Sir, when when I have to swap two numbers, then I have to take one temporary variable. Then first value I stored in the temporary variable. Then second value is equal to the first value. And then second value is gives to temporary variable. Okay. Why Python is said like it's a dynamically typed language? Sir, means when when we declare the any variable name, we must not need not to declare the data types while declaring a variable. But in static programming, we must write the data type while declaring a variable. What was your branch in engineering? Artificial intelligence. Okay. Do you learn database in college? No, sir. You know database SQL? Yes, sir. Okay. Why do you use SQL? For storing data, for storing data. How to retrieve data from the database? Queries are there for retrieving data. What it call? SQL. So have you ever tried writing any SQL for database? No, sir. There. No, never? Yeah. In practice. In practice you done in college? Okay, great. So you remember it? No, sir. No. But anyway, so that was really nice talking with you with regard to this interview. I have some feedback, like you're good with the technology. You do hard work. But I would encourage you to read more and more and bring more fluency. But you have, you have courage to come here. You have courage to come on this platform and showcase your knowledge to the people. And people, as I already told, your work is not to judge Kishori, but judge yourself. This again and again I'm saying. Write down in comment what you feel about this interview. What are the answers for my questions? That you can write in comment. You can always share this interview with your college graduates. I'm sharing this interview to the undergraduate people also, graduate people also. And those who are still pursuing the final year, third year and all that stuff. So what do you think? You like this interview? Yes, sir. Really? What's your feedback about this interview? It's my first interview. I learned a lot. That is, I have to improve myself. That's that's for everyone, even for me. When I talk, doesn't mean that it is always correct. So I always think about improving myself. My past should not be same as that of present or future. That is always there. Whenever I come for taking interviews, I think last time I did these mistakes, I was not talking properly, so let me do some in other way. And I keep improving. So same you need to do improvement, improvement, improvement. But you have good knowledge. You did logical programs also. When I asked pickling and like that questions, you tackled those very carefully. And really it was a good experience. Okay. So, guys, those who are seeing this interview, prepare well. Read each and everything. You go to Google, find out tricky questions on Python. Even if you're teaching somewhere else, once your teacher teach, you go to home, and search on Google that topic. Don't just see the recordings or live sessions on YouTube. That doesn't matter. That doesn't help you to grow in the interview. What needed is, once you learn from your teacher, prepare it by yourself, not by seeing videos or something. By reading, by practicing. And you will obviously able to achieve that. So thank you. Okay. One more the last thing, those who want to see all these videos offline, please download our app, which is available on the Play Store. Link is given in the description. So thank you. And thank you, Kishori. Thank you, sir.



