Skip to content

Commit 54c7851

Browse files
authored
Merge pull request darkprinx#35 from underlineGalaxy/patch-1
Day 6 additional solution and typo fix
2 parents 4874285 + 6f4b8b2 commit 54c7851

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Status/Day 6.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,24 @@ for i in a:
166166
print(i)
167167
```
168168

169+
**OR**
170+
171+
```python
172+
import re
173+
def multiple (patterns, string):
174+
for i in patterns:
175+
if not re.search(i, string):
176+
return False
177+
178+
if 6 <= len(string) <= 12:
179+
return True
180+
else:
181+
return False
182+
x = str(input("Type password: "))
183+
patterns = [r"[a-z]", r"[A-Z]", r"[0-9]", r"[$|#|@]"]
184+
print(multiple(patterns, x))
185+
```
186+
169187
---
170188

171189
# Question 19
@@ -239,7 +257,7 @@ print(lst)
239257

240258
## Conclusion
241259

242-
**_Before the above problems, I didn't even know about re(regular expression) module and its use. I didn't even know how to sort by multiple keys. To solve those problems in different ways I had to explore and learn those syntax.There are a lots of interesting stuffs in re module though I faced quite a bit hardship to understand many of them._**
260+
**_Before the above problems, I didn't even know about re(regular expression) module and its use. I didn't even know how to sort by multiple keys. To solve those problems in different ways I had to explore and learn those syntax. There are a lots of interesting stuffs in re module though I faced quite a bit hardship to understand many of them._**
243261

244262
[**_go to previous day_**](https://github.com/darkprinx/100-plus-Python-programming-exercises-extended/blob/master/Status/Day%205.md "Day 5")
245263

0 commit comments

Comments
 (0)