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 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
seal-mask
.a{fill-rule:evenodd;}techdegree
Alex Koumparos
Python Development Techdegree Student 36,887 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')] 

Cheers

Alex

angel moreta
angel moreta
2,912 Points

you are the man, thank you boss!