0
regular expression
how can i search '1~10' ?? I need list '1~10' s = ["1 line.", "2 line.", "3 line." ..........."10 line."] p = re.compile('[0-9]+') result = p.findall(s) print(result) output Traceback (most recent call last): File "e:\Google drive\0.Baikal\02 공부\인프런\python basic_02.py", line 58, in <module> result = p.findall(s) TypeError: expected string or bytes-like object https://code.sololearn.com/W961F9nI3Agi/?ref=app
2 Respuestas
+ 1
Did you accidentally put that link in the Description? it is not your code.
You can edit the thread and change that link to the one that actually points to the code in question, in order for the people to check it, and suggest accordingly 👍
+ 3
It is expecting string or bytes like object but you are giving it a list.
And why did you added a code in description that has nothing to do with your question ?