Tell us what’s happening:
Step 15
Inbox class that takes self and an email object email as parameters. Within the method body, add the email to the emails list using the append method.
class Inbox:
def init (self):
self.emails = .append(emails)
def receive_email(self, email):
self.email = email
You should append the email to self.emails.
Your code so far
class Email:
def __init__(self, sender, receiver, subject, body):
self.sender = sender
self.receiver = receiver
self.subject = subject
self.body = body
self.read = False
def mark_as_read(self):
self.read = True
class User:
def __init__(self, name):
self.name = name
self.inbox = Inbox()
def send_email(self, receiver, subject, body):
email = Email(sender=self, receiver=receiver, subject=subject, body=body)
# User Editable Region
class Inbox:
def __init__(self):
self.emails = [].append(emails)
def receive_email(self, email):
self.email = email
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build an Email Simulator - Step 15
ILM
February 26, 2026, 8:11am
2
dev_shinobi:
[].append(emails)
here you are appending to an empty list, make sure to double check what list you are asked to append what to
finally fix it
self.emails.append(email)
Tell us what’s happening:
Step 15
Your inbox needs a way to receive new emails. When someone sends an email to a user, it should be added to their inbox.
Add a method called receive_email to your Inbox class that takes self and an email object email as parameters. Within the method body, add the email to the emails list using the append method.
class Inbox:
def init (self):
self.emails = .append(emails)
def receive_email(self, email):
self.email = email
You should append the email to sel
Your code so far
class Email:
def __init__(self, sender, receiver, subject, body):
self.sender = sender
self.receiver = receiver
self.subject = subject
self.body = body
self.read = False
def mark_as_read(self):
self.read = True
class User:
def __init__(self, name):
self.name = name
self.inbox = Inbox()
def send_email(self, receiver, subject, body):
email = Email(sender=self, receiver=receiver, subject=subject, body=body)
# User Editable Region
class Inbox:
def __init__(self):
self.emails = emails.append(email)
def receive_email(self, email):
self.email = email
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build an Email Simulator - Step 15
Hi @dev_shinobi !
Here, you are asked to :
add the email to the emails list using the append method
but :
You don’t add email to self.emails
You don’t use append()
Hope this helped ! Enjoy coding !
its doesn’t help, how do I add email to self.emails
Wait, I just noticed that you have changed the initial code.
Previously, you defined self.emails as an empty list.
Next, you have to add the email to this list.
dhess
February 26, 2026, 3:27pm
8
Why is this in the init () method? You were asked to do this in the receive_email() method.
Since you have changed the starting code where you were not asked to make changes, please reset this step and try again.
class Inbox:
def \__init_\_(self):
self.emails = \[\]
def receive_email(self, email):
self.email = email
self.emails.append(email)
ILM
February 26, 2026, 3:55pm
12
please do not create multiple topics for the same challenge, I have merged your two topics
system
Closed
March 26, 2026, 3:56pm
13
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.