# Print the mapped data
print(json.dumps(mapped_data, indent=2))
with open('IQ-COURSE-MAP1.txt','a+', encoding='utf-8') as outputFile:
      outputFile.write(json.dumps(mapped_data, indent=2))

with open("C:/Users/HP/Downloads/Telegram/iQ/IQ-COURSE-MAP1.txt", encoding='utf-8') as f:
    linksList = f.readlines()
    for video in linksList:
      e = video.append({"name"})
      f = video["id"]
      print(e,':',f)

Traceback (most recent call last):
  File "C:\Users\HP\Downloads\Telegram\iQ\iQ-TEST1.py", line 3612, in <module>
    e = video.append({"name"})
AttributeError: 'str' object has no attribute 'append'
>>> 