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 Regular Expressions in Python Introduction to Regular Expressions Groups

angel moreta
angel moreta
2,912 Points

why am i getting an empty list?

https://w.trhou.se/qh88dbcg1c : check address_book.py

same code as kenneth's, i wrote this code on Atom and still getting and [] empty list so i guess i am missing something that i am too blind to see

I suggest using the built in IDE

1 Answer

Alex Koumparos
Alex Koumparos
Python Development Techdegree Student 36,862 Points

Hi Angel,

Your code is not the same as Kenneth's.

You have errors in your telephone line as follows:

  • the two \ characters after the first ? (Kenneth has one)
  • no closing curly brace after the first 3 (Kenneth has one)

Make those fixes and you should get the following output:

[('Love, Kenneth', 'kenneth@teamtreehouse.com', '(555) 555-5555', 'Teacher, Treehouse', '@kennethlove'
), ('Carson, Ryan', 'ryan@teamtreehouse.com', '(555) 555-5543', 'CEO, Treehouse', '@ryancarson'), ('Obama, Barack', 'president.44@us.gov', '555 555-5551', 'President, United States of America', '@potus44'
), ('Chalkley, Andrew', 'andrew@teamtreehouse.com', '(555) 555-5553', 'Teacher, Treehouse', '@chalkers'), ('Vader, Darth', 'darth-vader@empire.gov', '(555) 555-4444', 'Sith Lord, Galactic Empire', '@darthvader')] 



angel moreta
angel moreta
2,912 Points

you are the man, thank you boss!