0% found this document useful (1 vote)
438 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 substring patterns like lowercase letters joined by underscores or an uppercase letter followed by lowercase, and match words at the start or end of a string or containing 'z' in various positions but not at the start or end. The final program matches strings containing only letters, numbers and underscores.

Uploaded by

LOKESH KUMAR
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 (1 vote)
438 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 substring patterns like lowercase letters joined by underscores or an uppercase letter followed by lowercase, and match words at the start or end of a string or containing 'z' in various positions but not at the start or end. The final program matches strings containing only letters, numbers and underscores.

Uploaded by

LOKESH KUMAR
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/ 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