Q. Your recipe uses some ingredients. Write a program to store the list of ingredients in a binary file.
Answer :-
import pickle
ingredients = ['cucumber", "pumpkin', 'carrot', "peas"]
with open('recipe.dat', 'wb') as fout:
pickle.dump(ingredients, fout)
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )