FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/pythonchallenge/4.py at master · bjd1111/python · GitHub
bjd1111
python
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
pythonchallenge
/
4.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (22 loc) · 525 Bytes
Breadcrumbs
python
/
pythonchallenge
/
4.py
Copy path
File metadata and controls
31 lines (22 loc) · 525 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import
urllib
import
re
num0
=
12345
url
=
'http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing='
def
next
(
num
):
url1
=
url
+
str
(
num
)
a
=
urllib
.
urlopen
(
url1
)
content
=
a
.
read
()
pattern
=
re
.
compile
(
'is (.*)'
,
re
.
S
)
result
=
re
.
findall
(
pattern
,
content
)
print
content
return
result
[
0
]
def
go
():
num
=
num0
while
True
:
if
num
==
16044
:
num
=
num
/
2
if
num
==
82682
:
num
=
63579
next
(
num
)
num
=
next
(
num
)
go
()
Back
|
FazBrowse Home
|
New Git URL