Why are we using Square Brackets in python to access MIMEMultipart() components like ['From'], ['To'] for sending email using python?

In a python code, which is sending an email using "smtplib" and "MIMEMultipart" libraries, I got a doubt on, why we are using "square brackets" for [‘From’], [‘To’] and [‘Subject’] when referring to "MIMEMultipart ()". Could any anyone explain on this part ? Below is the code snipet, observe the commenting lines : import smtplib… Read More Why are we using Square Brackets in python to access MIMEMultipart() components like ['From'], ['To'] for sending email using python?