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 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?

create_tuple.py
 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.

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.