0% found this document useful (0 votes)
335 views

Python Imp Questions

Important questions to go-through the basics of Python

Uploaded by

nbofficialonline
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
335 views

Python Imp Questions

Important questions to go-through the basics of Python

Uploaded by

nbofficialonline
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Python Imp Questions.

1.) What are the different ways to create an array in Python?


Discuss the differences between lists and arrays.
2.) How do you perform common operations (like insertion,
deletion, searching) on arrays in Python? Provide examples.
3.) Explain the advantages and disadvantages of using arrays in
Python over other data structures
4.) How do Python strings differ from character arrays in other
programming languages? Discuss the immutability of Python
strings.
5.) Describe various string manipulation techniques in Python with
examples. (slicing, concatenation. formatting)
6.) . What are some efficient methods to search and replace
substrings in Python?
7.) what is a Python module? How does it differ from a Python
package
8.) Discuss the ways to import a module in Python. What are the
differences between import, from .. import. and import .„ as
9.) Explain how you can create and use custom modules in Python

10.)What are the different types of functions in Python?


Provide examples of each
11.) How are “args & kwargs” used in python functions?
Illustrate with examples?
12.) Discuss the concept of recursion in python. Provide an
example of an recursive function and explain its working
13.) How does Python handle decision making? Explain with
examples of if, elif and else statements.
14.) What is the difference between for and while loops in
Python? When should you use each?
15.) How does Python's exception handling mechanism work?
Explain the use of try. except, finally, and else blocks
16.) What are lambda functions in Python? How do they differ
from regular functions?
17.) Discuss scenarios where lambda functions can be
particularly useful. Provide examples
18.) Explain the limitations of lambda functions in Python
19.) Compare and contrast lists, tuples, and dictionaries in
Python. Discuss their use cases and limitations.
20.) How do You Perform common operations on lists, tuples,
and dictionaries (like insertion, deletion. going)?
21.) Explain the concept of dictionary comprehensions in
Python with examples.

You might also like