The document describes a series of assignments involving importing modules and functions in Python. It defines a hours() function in a zoo.py module that prints "Open 9-5 daily". It then imports and calls this function in various ways, including importing the module as another name and explicitly importing just the function. It also creates dictionaries and prints them out, including an ordered dictionary to show the order is maintained. Finally, it creates a default dictionary of lists and appends a value to one of the lists.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
65 views4 pages
Assignment18 PythonBasic
The document describes a series of assignments involving importing modules and functions in Python. It defines a hours() function in a zoo.py module that prints "Open 9-5 daily". It then imports and calls this function in various ways, including importing the module as another name and explicitly importing just the function. It also creates dictionaries and prints them out, including an ordered dictionary to show the order is maintained. Finally, it creates a default dictionary of lists and appends a value to one of the lists.