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

Python Assignment Unit 5

The document outlines a Python assignment focusing on regular expressions and HTML information retrieval. It includes detailed questions requiring explanations and programming examples for various tasks related to regular expressions, such as searching, splitting, replacing strings, and handling email IDs and file operations. The assignment aims to enhance understanding and practical skills in using regular expressions in Python.

Uploaded by

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

Python Assignment Unit 5

The document outlines a Python assignment focusing on regular expressions and HTML information retrieval. It includes detailed questions requiring explanations and programming examples for various tasks related to regular expressions, such as searching, splitting, replacing strings, and handling email IDs and file operations. The assignment aims to enhance understanding and practical skills in using regular expressions in Python.

Uploaded by

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

Python Assignment-5 (Unit 5)

Answer the following questions in detail. Add suitable example wherever necessary.

1. Explain regular expressions and its usage.


2. Discuss all key points for retrieving information from a HTML file. Write a program to explain the
same.
3. Write following programs for regular expressions.
a. To search for string starting with m and having total three characters using the search(),
findall() and map() methods.
b. To split a string into pieces where one or more non alpha numeric characters are found.
c. To replace a string with new string.
d. To retrieve all words 3 or 4 o 5 characters length.
e. To retrieve date of births from a string.
f. To read email ids from a file.
g. To retrieve data from a file and then write that to another file. ()Employee no., Salary)

You might also like