Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- # -*- coding: utf-8 -*-
- class Sandwiches():
- def __init__(self, ingredients=None):
- if ingredients:
- self.ingredients = ingredients
- else:
- self.basic_ingredients()
- def basic_ingredients(self):
- self.ingredients = [
- 'snails',
- 'leeches',
- 'gorilla belly - button lint',
- 'caterpillar eyebrows',
- 'centipide toes'
- ]
- def print_ingredients(self):
- for i in range(len(self.ingredients)):
- print(str(i + 1), self.ingredients[i])
- food = Sandwiches()
- food.print_ingredients()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement