[L10] what does r"(\d)(\1*)" mean??

246 views
Skip to first unread message

고혁인

unread,
Apr 26, 2017, 8:59:40 AM4/26/17
to Python Challenge
please help me 
I can't sleep 

jro...@gmail.com

unread,
Jun 7, 2017, 1:56:20 PM6/7/17
to Python Challenge
That's not how I solved it.  I'm guessing you looked up someone else's solution.  Look at the documentation for regular expressions in python.  The form r"...." indicates that you're specifying a regular expression inside the quotes.

I'm guessing what you found is probably part of an extremely compact solution.  However, unless you're a whiz with regular expressions, I would solve it first with simpler, more verbose code.

You don't need any code to figure out the pattern.  You just need code to figure out the 30th term, and find it's length after you've solved the pattern.
Reply all
Reply to author
Forward
0 new messages