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 Introducing Tuples Getting to Know Tuples Creating Tuples

Bummer: AssertionError: Regex didn't match: 'my_tuple

I am confident that my code is correct. I even tried writing it with parentheses (even though they don't matter). As well as, double quotes. However, I keep getting this error:

Bummer: AssertionError: Regex didn't match: 'my_tuple\s=\s[/(]?\\'?\"?I\"?\\'?,\s\\'?\"?love\"?\\'?,\s\\'?\"?python\"?\\'?[/)]?' not found in "my_tuple= 'I', 'love', 'python'" : To create a tuple, my_tuple should be equal to comma separated values. You can also use parentheses around the values if you want.

Is this a bug? or am I missing something?

 my_tuple= 'I', 'love', 'python'

1 Answer

It's probably a bug, because when I copy and paste your code and try it myself I get the same error. Try pasting this exact code and see if it gives you something different: my_tuple = 'I', 'love', 'python'

Thank you Jayda! That worked. I'm not sure what was different.

Brandon White
.a{fill-rule:evenodd;}techdegree seal-36
Brandon White
Treehouse Moderator

This was kinda strange, but the issue with your version of the code, Cylin, is that you did not include a space after my_tuple and before the assignment operator.

This wouldn’t pose an issue in your own code, but the test that evaluated for right or wrong expects a space after my_tuple. You can see it in the error message: my_tuple\s.... The \s stands for space.

Sorry you had that issue pop up. Great job coming through, Jayda. And also nice job with your code, Cylin.