Created
February 16, 2021 15:23
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
products = ["cherry", "strawberry", "banana"] | |
price = [2.5, 3, 5] | |
cost = [1, 1.5, 2] | |
for prod, p, c in zip(products, price, cost): | |
print(f'The profit of a box of {prod} is £{p-c}!') | |
# The profit of a box of cherry is £1.5! | |
# The profit of a box of strawberry is £1.5! | |
# The profit of a box of banana is £3! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment