Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Write Better Python Cleaner Code Imports

plz tell where am i getting wrong

it's constantly showing this :- Bummer! Your file has 1 error(s) on line(s) 8: blank line at end of file

import os
import sys
import logging
from re import match
from re import search

2 Answers

Luc Dachary
Luc Dachary
2,231 Points

Hi Ashmit Pathak, I just made the exercise and I have not faced your problem. Could you make sure you inserted a new line after search import? Your file should be six lines long.

can u plz show it in a code so that i could understand it better and yaa! thanx for your help...

Luc Dachary
Luc Dachary
2,231 Points

Sure Ashmit Pathak, here your are:

import os  # no trailing space
import sys  # no trailing space
import logging  # no trailing space
from re import match  # no trailing space
from re import search  # no trailing space, hit enter once
# empty line below

Thanx for helping me it really worked

Hey there,

Hmm I got some weird end of file thing doing it too. make sure you delete anything after the last thing you type and hit return before submitting. Also you can leave the "from re import match, search" line as it was. That last one's more just a stylistic thing. IT will still work whether you tell it to import the modules in two different commands or one combined one, but lots of programmers like to group them together by way of organising the file.