meat
['ham', 'turkey']
This is just a place for me to play around with python, jupyter notebook, nbdev, quarto, and pypi.
Let’s make a sandwich.
First, we need meat. Let’s say we have ham and turkey.
We use index to choose one from the list. For instance, we can use 0 for ham and 1 for turkey.
Then, we choose what kind of bread we want. We have white or potato.
Same pattern applies for choosing bread.
Lastly, we choose either pepperjack or cheddar cheese.
Sandwich (meat:int, bread:int, cheese:int)
A sandwich with meat
, bread
, and cheese
.
Type | Details | |
---|---|---|
meat | int | An index into meat |
bread | int | An index into bread |
cheese | int | An index into cheese |
We can check equality of sandwiches.
Dot dot dot…