+ 2
Python Challenge: Social Media Pro [Solved]
In the Python Regular Expressions Special Sequences lesson there’s a challenge called Social Media Pro. Using the pattern r"#\w+" only test 4 does not pass, but its details are hidden. Anyone have any idea what this test is looking for? EDIT: For anyone who searches this problem later, I figured out that Test 4 will pass if you allow for hyphens (- symbol) to be found in the pattern. Link to challenge (only works on mobile): https://sololearn.com/coach/274/?ref=app
4 Réponses
+ 1
✌️
+ 1
import re
text = input()
#your code goes here
#use re.findall() with r"#\w+" as the regex
list = re.findall(r"#\w+", text)
for i in list:
print(i)
0
Looking for this solution as well
0
Im on this one now and stuck, i cant figure out how to output the whole hashtag