1
2import pickle
3
4# take user input to take the amount of data
5number_of_data = int(input('Enter the number of data : '))
6data = []
7
8# take input of the data
9for i in range(number_of_data):
10 raw = input('Enter data '+str(i)+' : ')
11 data.append(raw)
12
13# open a file, where you ant to store the data
14file = open('important', 'wb')
15
16# dump information to that file
17pickle.dump(data, file)
18
19# close the file
20file.close()
21
22