Added code for lecture 2026-11-10
This commit is contained in:
parent
5b630435ae
commit
07b9e54bf0
52 changed files with 1248 additions and 1 deletions
BIN
lecture20261110/contacts_directory/0 main page.png
Normal file
BIN
lecture20261110/contacts_directory/0 main page.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
BIN
lecture20261110/contacts_directory/1 Phone type.png
Normal file
BIN
lecture20261110/contacts_directory/1 Phone type.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
BIN
lecture20261110/contacts_directory/2 email address.png
Normal file
BIN
lecture20261110/contacts_directory/2 email address.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
lecture20261110/contacts_directory/3 Address.png
Normal file
BIN
lecture20261110/contacts_directory/3 Address.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
21
lecture20261110/contacts_directory/listvsdictionary.py
Normal file
21
lecture20261110/contacts_directory/listvsdictionary.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
from pprint import pprint
|
||||
|
||||
addressList = ["John Smith", "1 Main St", "Anycity", "Ma", "01102"]
|
||||
|
||||
print(addressList)
|
||||
|
||||
print(sorted(addressList))
|
||||
|
||||
addressDictionary = {'Name':"John Smith", 'Address':"1 Main St", 'City': "Anycity",
|
||||
'State':"Ma", 'ZipCode': "01102"}
|
||||
|
||||
print(addressDictionary)
|
||||
|
||||
print(addressDictionary.keys())
|
||||
print(addressDictionary.values())
|
||||
|
||||
for Item in addressDictionary.keys():
|
||||
print(f"{Item:10s} {addressDictionary[Item]}")
|
||||
|
||||
pprint(addressDictionary)
|
||||
Loading…
Add table
Add a link
Reference in a new issue