

{"id":26773,"date":"2018-09-01T05:15:45","date_gmt":"2018-09-01T05:15:45","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=26773"},"modified":"2018-12-11T17:54:54","modified_gmt":"2018-12-11T12:24:54","slug":"interview-questions-for-python","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/","title":{"rendered":"Top Interview Questions For Python &#8211; Check your Ability"},"content":{"rendered":"<h2>1. Tricky Python Interview Questions<\/h2>\n<p>In our series of Python Interview Questions, we discussed<a href=\"https:\/\/data-flair.training\/blogs\/python-programming-interview-questions\/\"><strong> part 3 of Interview Questions<\/strong><\/a> for Python. Today, we will move towards part 4. This part of Interview Questions for Python contains some basic and important Python questions. If you want to crack your Python developer interview, these interview questions for Python will prove beneficial for you. Follow all the links for getting<a href=\"https:\/\/data-flair.training\/blogs\/python-tutorial-for-beginners\/\"> <strong>more in-depth knowledge of Python<\/strong><\/a>.<\/p>\n<p>So, let&#8217;s explore most asked Interview Questions for Python<\/p>\n<div id=\"attachment_36977\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36977\" class=\"size-full wp-image-36977\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg\" alt=\"Top Interview Questions For Python - Check your Ability\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-36977\" class=\"wp-caption-text\">Top Interview Questions For Python &#8211; Check your Ability<\/p><\/div>\n<h2>2. Best Interview Questions for Python<\/h2>\n<p>Following are the most <a href=\"https:\/\/data-flair.training\/blogs\/top-python-interview-questions-answer-2018\/\"><strong>tricky interview questions <\/strong><\/a>for Python. Both Python freshers and experienced can refer these Python Interview Questions. So, let&#8217;s see these interview questions for Python in detail &#8211;<\/p>\n<p><strong>Q.1. Take a look at this piece of code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; A0= dict(zip(('a','b','c','d','e'),(1,2,3,4,5)))\r\n&gt;&gt;&gt; A1= range(10)\r\n&gt;&gt;&gt; A2= sorted([i for i in A1 if i in A0])\r\n&gt;&gt;&gt; A3= sorted([A0[s] for s in A0])\r\n&gt;&gt;&gt; A4= [i for i in A1 if i in A3]\r\n&gt;&gt;&gt; A5= {i:i*i for i in A1}\r\n&gt;&gt;&gt; A6= [[i,i*i] for i in A1]\r\n&gt;&gt;&gt; A0,A1,A2,A3,A4,A5,A6<\/pre>\n<p><strong>What are the values of variables A0 to A6? Explain.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Here you go:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">A0= {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}\r\nA1= range(0, 10)\r\nA2= []\r\nA3= [1, 2, 3, 4, 5]\r\nA4= [1, 2, 3, 4, 5]\r\nA5= {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81}\r\nA6= [[0, 0], [1, 1], [2, 4], [3, 9], [4, 16], [5, 25], [6, 36], [7, 49], [8, 64], [9, 81]]<\/pre>\n<p><span style=\"font-weight: 400\">Now to find out what happened. A0 zips \u2018a\u2019 with 1, \u2018b\u2019 with 2, and so on. This results in tuples, which the call to dict() then turns into a dictionary by using these as keys and values.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/python-itertools-tutorial\/\">Have a look at Python Itertools<\/a><\/strong><\/p>\n<p><span style=\"font-weight: 400\">A1 gives us a range object with start=0 and stop=10.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A2 checks each item in A1- does it exist in A0 as well? If it does, it adds it to a list. Finally, it sorts this list. Since no items exist in both A0 and A1, this gives us an empty list.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A3 takes each key in A0 and returns its value. This gives us the list [1,2,3,4,5].<\/span><\/p>\n<p><span style=\"font-weight: 400\">A4 checks each item in A1- does it exist in A3 too? If it does, it adds it to a list and returns this list.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A5 takes each item in A1, squares it, and returns a dictionary with the items in A1 as keys and their squares as the corresponding values.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A6 takes each item in A1, then returns sublists containing those items and their squares- one at a time.<\/span><\/p>\n<p><strong>Q.2. Differentiate between split(), sub(), and subn() methods of the <i>re<\/i> module.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> The <\/span><i><span style=\"font-weight: 400\">re<\/span><\/i><span style=\"font-weight: 400\"> module is what we have for processing regular expressions with Python. Let\u2019s talk about the three methods we mentioned-<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>split()-<\/strong> This makes use of a regex pattern to split a string into a list<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>sub()-<\/strong> This looks for all substrings where the regex pattern matches, and replaces them with a different string<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>subn()-<\/strong> Like sub(), this returns the new string and the number of replacements made<\/span><\/li>\n<\/ul>\n<p><strong>Q.3. Differentiate between Django, Pyramid, and Flask.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> These are three major<strong> <a href=\"https:\/\/data-flair.training\/blogs\/python-web-framework\/\">frameworks in Python<\/a><\/strong>. Here are the differences:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We can also use <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-django-tutorial\/\">Django<\/a><\/strong> for larger applications. It includes an ORM.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Flask is a microframework for a small platform with simpler requirements. It is ready to use and you must use external libraries.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The pyramid is for larger applications. It is flexible and you can choose the database, the URL structure, the templating style, and much more. It is also heavily configurable.<\/span><\/li>\n<\/ul>\n<p><strong>Q.4. Explain the Inheritance Styles in Django.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Talking on <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-multiple-inheritance\/\">inheritance<\/a><\/strong> styles, we have three possible-<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>Abstract Base Classes-<\/strong> For the parent class to hold information so we don\u2019t have to type it out for each child model<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>Multi-table Inheritance-<\/strong> For subclassing an existing model and letting each model have its own database<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>Proxy Models-<\/strong> For modifying the model\u2019s Python-level behavior without having to change its fields<\/span><\/li>\n<\/ul>\n<p><strong>Q.5. Explain Python List Comprehension.<\/strong><\/p>\n<p><span style=\"font-weight: 400\">The <a href=\"https:\/\/data-flair.training\/blogs\/python-list-comprehension\/\"><strong>list comprehension<\/strong><\/a> is a way to declare a list in one line of code. Let\u2019s take a look at one such example.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; [i for i in range(1,11,2)]<\/pre>\n<p><strong>[1, 3, 5, 7, 9]<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; [i*2 for i in range(1,11,2)]<\/pre>\n<p><strong>[2, 6, 10, 14, 18]<\/strong><\/p>\n<p><strong>Q.6. How will you locally save an image using its URL address?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> For this, we use the urllib module.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; import urllib.request\r\n&gt;&gt;&gt; urllib.request.urlretrieve('https:\/\/yt3.ggpht.com\/a-\/ACSszfE2YYTfvXCIVk4NjJdDfFSkSVrLBlalZwYsoA=s900-mo-c-c0xffffffff-rj-k-no','dataflair.jpg')<\/pre>\n<p><strong>(&#8216;dataflair.jpg&#8217;, &lt;http.client.HTTPMessage object at 0x02E90770&gt;)<\/strong><\/p>\n<p><span style=\"font-weight: 400\">You can then get to your Python\u2019s location and confirm this.<\/span><\/p>\n<p><strong>Q.7. What does the map() function do?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> map() executes the function we pass to it as the first argument; it does so on all elements of the iterable in the second argument. Let\u2019s take an example, shall we?<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; for i in map(lambda i:i**3, (2,3,7)):\r\nprint(i)<\/pre>\n<p><strong>8<\/strong><br \/>\n<strong>27<\/strong><br \/>\n<strong>343<\/strong><\/p>\n<p><span style=\"font-weight: 400\">This gives us the cubes of the values 2, 3, and 7.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/python-geographic-maps-graph-data\/\">Have a look at Python Geographic maps and Graph Data<\/a><\/strong><\/p>\n<p><strong>Q.8. How will you share global variables across modules?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> To do this for modules within a single program, we create a special module, then import the config module in all modules of our application. This lets the module be global to all modules.<\/span><\/p>\n<p><strong>Q.9. What is the process to calculate percentiles with NumPy?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Refer to the code below.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; import numpy as np\r\n&gt;&gt;&gt; arr=np.array([1,2,3,4,5])\r\n&gt;&gt;&gt; p=np.percentile(arr,50)\r\n&gt;&gt;&gt; p<\/pre>\n<p><strong>3.0<\/strong><\/p>\n<p><strong>Q.10. What is Flask- WTF? Explain its features.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<a href=\"https:\/\/data-flair.training\/blogs\/python-flask\/\"> Flask<\/a><\/strong>-WTF supports simple integration with WTForms. It has the following features-<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Integration with wtforms<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Global csrf protection<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Recaptcha supporting<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Internationalization integration<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Secure form with csrf token<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">File upload compatible with Flask uploads<\/span><\/li>\n<\/ul>\n<p><strong>Interview Questions for Python Freshers &#8211; Q. 2,3,4,5,7,8,10<\/strong><\/p>\n<p><strong>Interview Questions for Python Experienced &#8211; Q. 1,6,9<\/strong><\/p>\n<p><strong>Q.11. How is NumPy different from SciPy?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> We have so far seen them used together. But they have subtle differences:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><a href=\"https:\/\/data-flair.training\/blogs\/scipy-tutorial\/\"><strong>SciPy<\/strong><\/a> encompasses most new features<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">NumPy does hold some linear algebra functions<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">SciPy holds more fully-featured versions of the linear algebra modules and other numerical algorithms<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><a href=\"https:\/\/data-flair.training\/blogs\/python-numpy-tutorial\/\"><strong>NumPy<\/strong> <\/a>has compatibility as one of its essential goals; it attempts to retain all features supported by any of its predecessors<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">NumPy holds the array data type and some basic operations: indexing, sorting, reshaping, and more<\/span><\/li>\n<\/ul>\n<p><strong>Q.12. What is the Dogpile effect?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> In case the cache expires, what happens when a client hits a website with multiple requests is what we call the dogpile effect. To avoid this, we can use a semaphore lock. When the value expires, the first process acquires the lock and then starts to generate the new value.<\/span><\/p>\n<p><strong>Q.13. How do you insert an object at a given index in Python?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Let\u2019s build a list first.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; a=[1,2,4]<\/pre>\n<p><span style=\"font-weight: 400\">Now, we use the method insert. The first argument is the index at which to insert, the second is the value to insert.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; a.insert(2,3)\r\n&gt;&gt;&gt; a<\/pre>\n<p><strong>[1, 2, 3, 4]<\/strong><\/p>\n<p><strong>Q.14. And how do you reverse a list?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Using the reverse() method.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; a.reverse()\r\n&gt;&gt;&gt; a<\/pre>\n<p><strong>[4, 3, 2, 1]<\/strong><\/p>\n<p><strong>Q.15. What is a Python module?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> A <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-modules\/\">module <\/a><\/strong>is a script in Python that defines import statements, functions, classes, and variables. It also holds runnable Python code. ZIP files and DLL files can be modules too. The module holds its name as a string that is in a global variable.<\/span><\/p>\n<p><strong>Q.16. What is the <i>with<\/i>\u00a0statement in Python?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Using the <\/span><i><span style=\"font-weight: 400\">with<\/span><\/i><span style=\"font-weight: 400\"> statement, we open files, process data in files, and even close them without having to make a call to the close() method. This makes exception-handling simpler with the cleanup activities. Here\u2019s a demonstration-<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; with open('data.txt') as data:\r\n#processing statements<\/pre>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/errors-and-exceptions-in-python\/\">You must read errors and exceptions in Python<\/a><\/strong><\/p>\n<p><strong>Q.17. What are the different file-processing modes with Python?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> We have the following modes-<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">read-only &#8211; \u2018r\u2019<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">write-only &#8211; \u2018w\u2019<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">read-write &#8211; \u2018rw\u2019<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">append &#8211; \u2018a\u2019<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">We can open a text file with the option \u2018t\u2019. So to open a text file to read it, we can use the mode \u2018rt\u2019. Similarly, for binary files, we use \u2018b\u2019.<\/span><\/p>\n<p><strong>Q.18. What are the file-related modules we have in Python?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> We have the following <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-library\/\">libraries<\/a><\/strong> and modules that let us manipulate text and binary files on our file systems-<\/span><\/p>\n<p><span style=\"font-weight: 400\">os<\/span><\/p>\n<p><span style=\"font-weight: 400\">os.path<\/span><\/p>\n<p><span style=\"font-weight: 400\">shutil<\/span><\/p>\n<p><strong>Q.19. What makes Python object-oriented?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Python is object-oriented because it follows the O<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-classes\/\">bject-Oriented programming<\/a><\/strong> paradigm. This is a paradigm that revolves around classes and their instances (objects). With this kind of programming, we have the following features:<\/span><\/p>\n<p><span style=\"font-weight: 400\">Encapsulation<\/span><\/p>\n<p><span style=\"font-weight: 400\">Abstraction<\/span><\/p>\n<p><span style=\"font-weight: 400\">Inheritance<\/span><\/p>\n<p><span style=\"font-weight: 400\">Polymorphism<\/span><\/p>\n<p><span style=\"font-weight: 400\">Data hiding<\/span><\/p>\n<p><strong>Q.20. Does Python support interfaces like Java does?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> No. However, Abstract Base Classes (ABCs) are a feature from the <\/span><i><span style=\"font-weight: 400\">abc<\/span><\/i><span style=\"font-weight: 400\"> module that let us declare what methods subclasses should implement. Python supports this module since version 2.7.<\/span><\/p>\n<p><strong>Interview Questions for Python Freshers &#8211; Q. 11,12,15,16,19,20<\/strong><\/p>\n<p><strong>Interview Questions for Python Experienced &#8211; Q. 13,14,18<\/strong><\/p>\n<p><strong>Q.21. Explain the output of the following piece of code-<\/strong><br \/>\n<b><\/b><\/p>\n<p><b>x=[\u2018ab\u2019,\u2019cd\u2019]<\/b><br \/>\n<b><\/b><\/p>\n<p><b>print(len(map(list,x)))<\/b><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> This actually gives us an error- a TypeError. This is because map() has no len() attribute in their dir().<\/span><\/p>\n<p><strong>Q.22. So what is the output of the following piece of code?<\/strong><br \/>\n<b><\/b><\/p>\n<p><b>x=[\u2018ab\u2019,\u2019cd\u2019]<\/b><br \/>\n<b><\/b><\/p>\n<p><b>print(len(list(map(list,x))))<\/b><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> This outputs 2 because the length of each string is 2.<\/span><\/p>\n<p><strong>Q.23. How can you keep track of different versions of code?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> To make this happen, we implement version control. For this, one tool you can use is Git.<\/span><\/p>\n<p><strong>Q.24. Explain garbage collection with Python.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> The following points are worth nothing for the garbage collector with CPython-<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">Python maintains a count of how many references there are to each object in memory<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">When a reference count drops to zero, it means the object is dead and Python can free the memory it allocated to that object<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The garbage collector looks for reference cycles and cleans them up<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Python uses <strong>heuristics<\/strong> to speed up garbage collection<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Recently created objects might as well be dead<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The garbage collector assigns generations to each object as it is created<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">It deals with the younger generations first.<\/span><\/li>\n<\/ul>\n<p><strong>Q.25. How is Python different from Java?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong>\u00a0Following is the<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-vs-java\/\"> comparison of Python vs Java<\/a>\u00a0<\/strong>&#8211;\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>a.<\/strong> Java is faster than Python<\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>b.<\/strong> Python mandates indentation. Java needs braces.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>c.<\/strong> Python is dynamically-typed; Java is statically typed.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>d.<\/strong> Python is simple and concise; Java is verbose<\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>e.<\/strong> Python is interpreted<\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>f.<\/strong> Java is platform-independent<\/span><\/p>\n<p><span style=\"font-weight: 400\"><strong>g.<\/strong> Java has stronger database-access with JDBC<\/span><\/p>\n<p><strong>Q.26. How do we execute Python?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> Python files first compile to bytecode. Then, the host executes them.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&lt;provide link to Python Compiler Tutorial&gt;<\/pre>\n<p><strong>Q.27. What is the Python interpreter prompt?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> This is the following sign for<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-interpreter\/\"> Python Interpreter<\/a><\/strong>:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt;<\/pre>\n<p>If you have worked with the IDLE, you will see this prompt.<\/p>\n<p><strong>Q.28. Explain try, raise, and finally.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> These are the keywords we use with exception-handling. We put risky code under a try block, use the raise statement to explicitly raise an error, and use the finally block to put code that we want to execute anyway.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&lt;put link to exception handling&gt;<\/pre>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/exception-handling-in-python\/\">Have a look at Python Exception Handling<\/a><\/strong><\/p>\n<p><strong>Q.29. What happens if we do not handle an error in the except block?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> If we don\u2019t do this, the program terminates. Then, it sends an execution trace to sys.stderr.<\/span><\/p>\n<p><strong>Q.30. How does a function return values?<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><strong>Ans.<\/strong> A function uses the \u2018return\u2019 keyword to return a value. Take a look:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def add(a,b):\r\n       return a+b<\/pre>\n<p><strong>Interview Questions for Python Freshers &#8211; Q. 21, 23, 26, 29<\/strong><\/p>\n<p><strong>Interview Questions for Python Experienced &#8211; Q. &#8211; 22, 24, 25,27,28,30<\/strong><\/p>\n<p>So, this was all in Interview Questions for Python. Hope this helps you.<\/p>\n<h2>3. Conclusion &#8211; Interview Questions for Python<\/h2>\n<p><span style=\"font-weight: 400\">So, you have completed the Interview Questions for <a href=\"https:\/\/www.python.org\/\">Python<\/a>. We hope you learned something new with this set of Python Interview Questions we curated right for you. Want more? We\u2019ll be here with more questions. Still, if you have any query related interview Questions for Python, ask in the comment tab.<\/span><\/p>\n<p><strong>See also &#8211;\u00a0<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/questions-for-python-interview\/\"><strong>Python Interview Questions part 6<\/strong><\/a><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:149,&quot;href&quot;:&quot;https:\\\/\\\/www.python.org&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251206090101\\\/https:\\\/\\\/www.python.org\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-06 12:20:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-09 12:44:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-12 13:49:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-15 14:13:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 15:26:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-21 17:05:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-24 19:33:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-28 02:44:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-31 04:43:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-03 07:01:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-06 07:15:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-09 07:16:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-12 10:01:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-15 10:07:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-18 10:11:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-21 10:20:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-24 10:47:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-27 10:58:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-30 10:59:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-02 12:28:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-05 13:05:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-08 15:11:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 15:46:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 17:21:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 18:37:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 18:52:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 19:52:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 01:02:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 03:50:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 05:18:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 06:18:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 07:24:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 08:33:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 08:58:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-20 12:26:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 14:32:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 16:21:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-29 17:22:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-01 18:18:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 18:27:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-08 02:33:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 04:53:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 06:48:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-17 07:17:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 07:32:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-23 09:34:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-26 10:13:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-29 10:35:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-02 11:50:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-05 12:07:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-08 13:08:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-11 14:46:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-14 21:24:09&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-18 03:08:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-21 06:27:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-24 07:06:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-27 07:30:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-30 08:47:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-02 09:37:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-05 09:43:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-08 10:40:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-11 10:49:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-14 16:29:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-17 18:19:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-20 22:43:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-24 02:56:27&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-24 02:56:27&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Tricky Python Interview Questions In our series of Python Interview Questions, we discussed part 3 of Interview Questions for Python. Today, we will move towards part 4. This part of Interview Questions for&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":36977,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[1655,6015,6963,7790,9929,10384,10611,14846,14925],"class_list":["post-26773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-basic-python-interview-questions","tag-how-to-crack-python-interview","tag-interview-questions-for-python","tag-job-interview-preparation","tag-preparation-for-python-interview","tag-python-basic-interview-questions","tag-python-interview-questions","tag-top-python-interview-questions","tag-tricky-python-interview-questions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Top Interview Questions For Python - Check your Ability - DataFlair<\/title>\n<meta name=\"description\" content=\"Interview Questions for Python Freshers and experienced, Python Interview Questions and Answers, preparation for Python Interview,crack Python Interview\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Top Interview Questions For Python - Check your Ability - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Interview Questions for Python Freshers and experienced, Python Interview Questions and Answers, preparation for Python Interview,crack Python Interview\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-01T05:15:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-11T12:24:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Top Interview Questions For Python - Check your Ability - DataFlair","description":"Interview Questions for Python Freshers and experienced, Python Interview Questions and Answers, preparation for Python Interview,crack Python Interview","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/","og_locale":"en_US","og_type":"article","og_title":"Top Interview Questions For Python - Check your Ability - DataFlair","og_description":"Interview Questions for Python Freshers and experienced, Python Interview Questions and Answers, preparation for Python Interview,crack Python Interview","og_url":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-09-01T05:15:45+00:00","article_modified_time":"2018-12-11T12:24:54+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Top Interview Questions For Python &#8211; Check your Ability","datePublished":"2018-09-01T05:15:45+00:00","dateModified":"2018-12-11T12:24:54+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/"},"wordCount":1828,"commentCount":4,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg","keywords":["basic python interview questions","How to crack Python Interview","Interview Questions for Python","job interview preparation","Preparation for Python Interview","python basic interview questions","python interview questions","top Python Interview Questions","tricky Python Interview Questions"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/","url":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/","name":"Top Interview Questions For Python - Check your Ability - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg","datePublished":"2018-09-01T05:15:45+00:00","dateModified":"2018-12-11T12:24:54+00:00","description":"Interview Questions for Python Freshers and experienced, Python Interview Questions and Answers, preparation for Python Interview,crack Python Interview","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/09\/Python-Interview-Questions-2-01.jpg","width":1200,"height":628,"caption":"Top Interview Questions For Python - Check your Ability"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/interview-questions-for-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Top Interview Questions For Python &#8211; Check your Ability"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/26773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=26773"}],"version-history":[{"count":9,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/26773\/revisions"}],"predecessor-version":[{"id":45324,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/26773\/revisions\/45324"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/36977"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=26773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=26773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=26773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}