-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
mens small heather seafoam | ||
womens medium Heather Purple | ||
womens medium berry | ||
mens medium heather coral silk | ||
womens Small Kiwi | ||
mens large Graphite Heather | ||
mens large sport grey | ||
mens small Carolina Blue | ||
mens large heather purple | ||
mens large heather coral silk | ||
mens Medium Heather Royal | ||
mens large Heather Irish | ||
womens Medium heather purple | ||
mens xs white | ||
mens Medium heather royal | ||
womens Small Berry | ||
mens medium Heather Galapagos Blue | ||
womens Medium Royal heather | ||
womens Small Antique Heliconia | ||
womens large kiwi | ||
womens Small Antique Heliconia | ||
mens xl Heather cardinal | ||
womens xs Heather orange | ||
mens small Cornsilk | ||
mens medium Heather Forest | ||
mens small dark heather | ||
mens small Heather Maroon | ||
mens small Royal Blue | ||
womens medium kiwi | ||
mens medium gold | ||
mens large Heather Royal | ||
mens xl indigo blue | ||
womens medium berry | ||
mens medium Heather Military Green | ||
mens medium dark heather | ||
mens medium Carolina Blue | ||
mens large Carolina Blue | ||
womens medium Carolina Blue | ||
Mens Medium Iris | ||
child 4T green | ||
child 3T pink | ||
child 2T orange | ||
child 6T pink | ||
child 4T green | ||
Womens Medium Kiwi | ||
Womens Medium heather purple | ||
mens small olive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python3 | ||
|
||
|
||
""" | ||
mens large heather purple | ||
mens small heather seafoam | ||
womens medium Heather Purple | ||
womens medium berry | ||
mens medium heather coral silk | ||
womens Small Kiwi | ||
mens large Graphite Heather | ||
mens large sport grey | ||
""" | ||
|
||
shirts = {} | ||
with open("shirts.txt","r") as file_object: | ||
for line in file_object: | ||
line = line.rstrip() | ||
[style, size, color] = line.split("\t") | ||
style = style.lower() | ||
size = size.lower() | ||
color = color.lower() | ||
if style not in shirts: | ||
shirts[style] = {} | ||
if size not in shirts[style]: | ||
shirts[style][size] = {} | ||
if color not in shirts[style][size]: | ||
shirts[style][size][color] = 0 | ||
|
||
shirts[style][size][color] += 1 | ||
|
||
for style in shirts: | ||
for size in shirts[style]: | ||
for color in shirts[style][size]: | ||
count = shirts[style][size][color] | ||
print(style,size,color,count) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters