Skip to content

Commit 5c3108a

Browse files
4
1 parent f93d0f4 commit 5c3108a

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

4.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import requests
2+
3+
def getNext(arg):
4+
url = "http://www.pythonchallenge.com/pc/def/linkedlist.php"
5+
params = "nothing={}".format(arg)
6+
res = requests.get(url, params)
7+
cont = res.text
8+
print(cont)
9+
ary = cont.split(' ')
10+
next_arg = ary[-1]
11+
if next_arg.isdigit():
12+
getNext(ary[-1])
13+
else:
14+
print("result is: {}".format(next_arg))
15+
16+
getNext(12345)

0 commit comments

Comments
 (0)