Lab – Creating a package

In a new directory create a package with 2 modules:

chelpers

import re
def countuppers(st):
    return len(re.findall(r'[A-Z]',st))

def countlowers(st):
    return len(re.findall(r'[A-Z]',st))

numhelpers

def _isdigit(c):  
    return  c.isdigit()

def add3nums(a,b,c):
    return a+b+c

def countdigit(st):
    return len([c for c in st if c.isdigit()]) 

Add simple test to each module

Add __init__.py file to import only chelpers module by default

 

Test your work