5. What does Python's \"#\" symbol mean?<\/span><\/h3>\nWe can use the # symbol to add comments on everything that comes after on the line.<\/span><\/p>\n6. Does Python require indentation?<\/span><\/h3>\nIndentation is an integral part of Python as it signifies a block of code. An indented block contains code within loops, functions, and classes. You can create an indentation using only four space characters. However, we must be careful to indent our code properly, or it will show errors and fail to execute.<\/span><\/p>\n7. Why is self used in Python?<\/span><\/h3>\nSelf is an object or a class instance in Python. Self comes in the first parameter. We can use self to distinguish between attributes of a class with local variables and methods.<\/span><\/p>\n8. What does a Python lambda function mean?<\/span><\/h3>\nThe lambda function in Python is an anonymous, single-expression function used as an inline function. We can use the lambda function by using the keyword \u2018lambda\u2019, and follow it up with input parameters, a colon, and an expression.<\/span><\/p>\n9. What are scopes and namespaces in Python?<\/span><\/h3>\nA namespace is a container. It contains identifiers like functions and variables. In comparison, scopes control the visibility of these identifiers in our code.<\/span><\/p>\n10. What is PEP 8?<\/span><\/h3>\nGuido van Rossum, Barry Warsaw, and Nick Coghlan wrote the Python Enhancement Proposal (PEP 8), which specifies coding style recommendations for developing readable and consistent Python code.<\/span><\/p>\n11. What is the difference between a list and a tuple?<\/span><\/h3>\nAlthough iterations take time, lists are mutable data types that require more memory and work well for operations like insertion and deletion. Tuples, on the other hand, are efficient for element access with faster iterations, use less memory, and are immutable.<\/span><\/p>\n12. What is monkey patching?<\/span><\/h3>\nThe term \"monkey patch\" in Python exclusively describes run-time, dynamic changes made to a class or module.<\/span><\/p>\n13. Is this statement true \u201cPython is a case-sensitive language\u201d?<\/span><\/h3>\nYes, it is true that Python is case-sensitive. It is important to remember that \u201cfunction\u201d and \u201cFunction\u201d have different existences, just like Pascal and SQL handle them separately.<\/span><\/p>\n14. What is a dictionary in Python?<\/span><\/h3>\nPython comes equipped with a built-in datatype called dictionary. The dictionary helps create a one-on-one mapping between values and keys. Dictionary values and keys are kept in pairs. Dictionary values are indexed using keys.<\/span><\/p>\n15. How can you write comments in Python?<\/span><\/h3>\nYou can use the # symbol to create single-line comments. You can use triple quotes to contain multi-line comments like this: \u201c \u201c \u201ctext\u201d \u201c \u201c.<\/span><\/p>\n16. What is polymorphism in Python?<\/span><\/h3>\nPolymorphism means having multiple forms. If a parent class has a method called ABC, for example, the child class can also have a method named ABC, but with different variables and parameters. Python supports polymorphism.<\/span><\/p>\n17. How do you do data abstraction in Python?<\/span><\/h3>\nYou can do data abstraction in Python using interfaces and abstract classes.<\/span><\/p>\n18. What does the method <\/span>object()<\/i><\/b> do?<\/span><\/h3>\nThe method <\/span>object()<\/i><\/b> returns an object with no features that serve as the foundation for all classes. You don\u2019t need any parameters for this method.<\/span><\/p>\n19. What is pickling and unpickling?<\/span><\/h3>\nPickling is when you transform a Python object hierarchy into a byte stream to store in a database. Pickling is also called serialisation. Unpickling is the exact opposite of pickling. During unpickling, you can convert the byte stream into an object hierarchy.<\/span><\/p>\n20. How does Python pass parameters by reference or by value?<\/span><\/h3>\nIn Python, everything is an object, and references to those objects are stored in all variables. We cannot alter the value of the references since the functions set them. On the other hand, we can alter the objects if they are mutable.<\/span><\/p>\n21. How do you delete files in Python?<\/span><\/h3>\nWe can either use <\/span>os.unlink()<\/i><\/b> or <\/span>os.remove()<\/i><\/b> to delete a file using Python.<\/span><\/p>\n22. What is pass in Python?<\/span><\/h3>\nYou can use the pass keyword in Python to represent a null operation. The general use of pass is to fill in blank code blocks that need to be completed. In some cases, they can execute without even a complete runtime. We can encounter issues during code execution without the pass statement.<\/span><\/p>\n23. Why is a split used?<\/span><\/h3>\nUsing the <\/span>split()<\/i><\/b> function, you can split a string.<\/span><\/p>\n24. How would you find the most common elements in a list?<\/span><\/h3>\nThe `<\/span>most_common()}<\/i><\/b> function can be used to identify the elements that are most frequently seen after counting the instances of each element in the list using the `collections.Counter` class.<\/span><\/p>\n25. What is docstring in Python?<\/span><\/h3>\nWe can use docstring in Python to associate documentation with methods, classes, and functions. We can describe these components using docstring.<\/span><\/p>\n26. What is Pythonpath?<\/span><\/h3>\nPythonpath is an environment variable that can be used when importing a module. Whenever a module is imported, Python also runs PythonPath to check for other imported modules in different directories. This helps determine which module to load.<\/span><\/p>\n27. Do we need to declare variables in Python with their corresponding data types?<\/span><\/h3>\nNo, we don\u2019t need to declare variables because Python is a dynamically typed language. For example, we can identify a variable\u2019s data by its assigned value.<\/span><\/p>\n28. What is unittest in Python?<\/span><\/h3>\nPython\u2019s unittest is a unit testing framework. With unittest we can share shutdown and setup codes, aggregate tests into collections, and make tests independent from the reporting framework.\u00a0<\/span><\/p>\n29. What is a Python Decorator?<\/span><\/h3>\nWe can use a Python decorator to contain a Python method and add additional code to change its behaviour. We can use the \u2018@\u2019 symbol to invoke a Python decorator function.<\/span><\/p>\n30. What is the difference between Python arrays and lists?<\/span><\/h3>\nPython arrays must contain elements of the same data type and are more memory-efficient, while Python lists can contain elements of different data types but consume more memory.<\/span><\/p>\n31. What are the different types of operators in Python?<\/span><\/h3>\nThe commonly used operators in Python are Arithmetic, Logical, Bitwise, Assignment, Comparison\/Relational, Identity, and Membership operators.<\/span><\/p>\n32. What are Python libraries? Name a few of them.<\/span><\/h3>\nPython libraries are collections of Python packages. Scikit-learn, Numpy, Matplotlib, and Pandas are a few examples of Python libraries.<\/span><\/p>\n33. What is an interpreted language?<\/span><\/h3>\nWe can use an interpreted language when we need to execute statements line by line. Some popular interpreted languages are Javascript, PHP, R, Ruby, and Python. Using interpreted languages we can run programs directly from the source, without using any compilation step in between.<\/span><\/p>\n34. What are access Specifiers in Python?<\/span><\/h3>\nWe can determine a class member\u2019s visibility using access specifiers (private, protected, public). We can use public members anywhere, private members only in the class, and protected within derived classes.<\/span><\/p>\n35. Why don\u2019t lambda forms have statements?<\/span><\/h3>\nPython lambda forms do not include the statement since it is needed to generate and return the new function object at runtime.<\/span><\/p>\n36. What is slicing in Python?<\/span><\/h3>\nWe can use slicing to access certain parts of sequences like tuples, strings, and lists.<\/span><\/p>\n37. How do you make a Python script executable on UNIX?<\/span><\/h3>\nTo execute on UNIX, we need to start our script with #!\/usr\/bin\/env python.<\/span><\/p>\n38. What are the different built-in data types in Python?<\/span><\/h3>\nWe can access many built-in data types in Python, including mapping types (dictionary), sequence types (range, tuple, list, string), numeric types (complex, float, int), and set types.<\/span><\/p>\n39. Is multiple inheritance supported in Python?<\/span><\/h3>\nPython supports multiple inheritance and its uses. Multiple instances are when a class is created from multiple individual parent classes. Multiple instances are feature-rich and beneficial to users.<\/span><\/p>\n40. What is PIP?<\/span><\/h3>\nPIP is short for Python Installer Package. We can use PIP to install various Python modules seamlessly. Since PIP is a command-line tool, we can use it to look for packages online and install them without interacting with anyone.\u00a0<\/span><\/p>\n41. What is _init_?<\/span><\/h3>\nIn Python, <\/span>_init_<\/i><\/b> is a method or constructor. We can use the <\/span>_init_<\/i><\/b> method to allocate memory to newly created objects.<\/span><\/p>\n42. How will you capitalise the first letter of the string?<\/span><\/h3>\nWe can use the <\/span>capitalise()<\/i><\/b> method when we need to capitalise a string\u2019s first letter. The method will return the original string if the string already has a capital letter at the beginning.<\/span><\/p>\n43. What is the difference between \u2018return\u2019 and \u2018yield\u2019 keywords?<\/span><\/h3>\nIn Python, 'return' transmits a value and terminates a function, whereas 'yield' provides a value while retaining the function's state, allowing it to continue from where it stopped.<\/span><\/p>\n44. What method will you use to convert a string to all lowercase?<\/span><\/h3>\nTo convert a string to lowercase we can use the <\/span>lower()<\/i><\/b> function.<\/span><\/p>\n45. What are built-in types of Python?<\/span><\/h3>\nSome of the commonly used built-in types of Python are Boolean, floating point, built-in functions, complex numbers, and string.<\/span><\/p>\n46. What does negative indexing Mean?<\/span><\/h3>\nNegative indexing is when we start indexing from the opposite end of a sequence. For example, the last element in a list is the -1 index, -2 for the second-to-last, and so on. We can skip calculating the exact index and access elements easily using negative indexing.<\/span><\/p>\n47. What are the uses of ternary operators in Python?<\/span><\/h3>\nWe can use the ternary operator to show conditional statements in Python. This comprises a statement that needs to be verified and boolean true or false values.<\/span><\/p>\n48. How to add values to a Python array?<\/span><\/h3>\nWe can use the <\/span>insert (i,x)<\/i><\/b>