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.