Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Python Data Types Del

I don't know how to do this exercise

Any codes for completion

delete.py
current_count = 14
planned = 5upcoming_releases = 2

1 Answer

Hi there,

First, make sure you keep the variables at the top on separate lines - lines and spacing are really important in python. They should look like this:

current_count = 14
planned = 5
upcoming_releases = 2

Then, it's asking that you use code to remove the 'planned' variable, without changing the code that is already there. In the previous video, the 'del' keyword is mentioned - you can use that to delete a variable that you don't need anymore. You do this by typing 'del' followed by one space, then the name of the variable you want to delete. So, in this case, you're adding a line at the bottom that says:

del planned

thanks so much