0% found this document useful (0 votes)
964 views4 pages

1 - Write A Python Program To Check That A String Contains Only A Certain Set of Characters (In This Case A-Z, A-Z and 0-9)

This document provides instructions for writing 8 Python programs to perform various string matching tasks. The programs are asked to check for valid character sets, find specific lowercase letter patterns, match words at the beginning or end of strings with optional punctuation, search for words containing 'z' in different positions, and check for strings containing only certain valid characters.

Uploaded by

LOKESH KUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
964 views4 pages

1 - Write A Python Program To Check That A String Contains Only A Certain Set of Characters (In This Case A-Z, A-Z and 0-9)

This document provides instructions for writing 8 Python programs to perform various string matching tasks. The programs are asked to check for valid character sets, find specific lowercase letter patterns, match words at the beginning or end of strings with optional punctuation, search for words containing 'z' in different positions, and check for strings containing only certain valid characters.

Uploaded by

LOKESH KUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 4

1 .

Write a Python program to check that a string contains only a certain set of
characters (in this case a-z, A-Z and 0-9)

2. Write a Python program to find sequences of lowercase letters joined with a


underscore.
3. Write a Python program to find the sequences of one upper case letter
followed by lower case letters

4.write a python program that matches a word at the beginning of the string
5. Write a Python program that matches a word at the end of string, with
optional punctuation

6. Write a Python program that matches a word containing 'z'.


7. Write a Python program to match a string that contains only upper and
lowercase letters, numbers, and underscores

8. Write a Python program that matches a word containing 'z', not at the start
or end of the word

You might also like