Ok, so basically I have a CSV file with a list of phones and their IMEI numbers which consists of a 15 digit number - currently formatted like so "000000000000000" and I need take that list from the csv and generate ouput IMEI format to "00 000000 000000 0" A space after the first 2 digits, one space after the next six, and finally a space before the last, but I am not sure how to go about it :(
import csv
file_csv = input("enter file name: \n")
phone_imei=[]
with open(file_csv, "r") as f:
reader = csv.reader(f, delimiter = ',')
for row in reader:
phone_imei.append(row[3]) # list of IMEI in this row#
location_file.close()
print(phone_imei)