0% found this document useful (0 votes)
2 views1 page

Python Question Bank

The document is a question bank that covers various topics related to Python programming, including string handling methods, indexing and slicing of strings, clipboard functions, file operations, and shell utilities. It also includes tasks such as walking a directory tree and developing programs for word frequency and sorting text files. Each question requires explanations and examples to demonstrate understanding of the concepts.

Uploaded by

ghthanushkumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Python Question Bank

The document is a question bank that covers various topics related to Python programming, including string handling methods, indexing and slicing of strings, clipboard functions, file operations, and shell utilities. It also includes tasks such as walking a directory tree and developing programs for word frequency and sorting text files. Each question requires explanations and examples to demonstrate understanding of the concepts.

Uploaded by

ghthanushkumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Question Bank

1. Explain python string handling methods with example:


a) xstring() b)Join() c)split() d) strip() e) just()
2. Briefly explain indexing and slicing of strings with examples
3. What are clipboard functions? Explain different clipboard functions in python used in
wikimarkup
4. What are absolute path and relative path? Explain with example.
5. Briefly explain with an example,

 opening a file with open(),


 reading the contents of the file with read() and
 writing to files with write() with different options
6. Briefly explain saving variable using the shelve() module and print pformat() function
with respective code snippets.
7. Explain the following shell utilities functions with example:
a) Shutil.copy() b) shutil.copytree c) shutil.move() d) send2trash()
8. Briefly explain how to walk a directory tree using os.walk () function.
9. Develop a program to print 10 most frequently appearing words in a text file.
10. Develop a program to sort the contents of a text file and write the sorted contents into a
separate text file.

You might also like