- 1
Python re question
import re >>> curr = '1' >>> for each in range(30): ... match = re.findall("(\d)(\\1*)",curr) ... curr = "".join([str(len(k+y))+k for k,y in match]) ... >>> print len(curr) \\ 1,11,21,1211,111221, ... \\ 5808 In this program,what does the "(\d)(\\1*)" mean???
1 ответ
+ 8
I thought we got that covered ;)
https://www.sololearn.com/discuss/344854/?ref=app