我尝试执行以下代码,但无法执行错误:未定义名称xrange"
I try to execute following code but can't with mistake: name 'xrange' is not defined
pages = (
requests.get(
build_group_request({
"offset": WINDOW_SIZE * i,
"count": WINDOW_SIZE,
"fields": "sex,interests,bdate"
})
).json()['response']['items']
for i in xrange(int(float(COUNT) / 100 + 1))
)
你可能使用的是 Python3,其中 xrange
已变成 range
.
You're probably using Python3, where xrange
has become range
.
这篇关于Python 3 中未定义名称“xrange"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!