美文网首页
Python Challenge 第3关

Python Challenge 第3关

作者: alabiubiubiu | 来源:发表于2016-07-08 08:44 被阅读36次

地址:http://www.pythonchallenge.com/pc/def/linkedlist.php

text = "original string"
text = text.replace("\n", "")
url = ''

for i in range(len(text)):
    if (i < len(text)-8) and (text[i]+text[i+4]+text[i+8]).islower() and (text[i+1:i+4]+text[i+5:i+8]).isupper():
    # 抽取第1个,第5个,第9个,检查是不是小写字母。抽取第2到第4,第6到第8,检查是否大写字母。
        url += text[i+4]

print(url)

相关文章

  • Python Challenge 第3关

    地址:http://www.pythonchallenge.com/pc/def/linkedlist.php

  • Python Challenge 第3关

    第3关 没看懂题目,大概意思是一个小写字母,两边是三个大写字母。页面内没有内容,应该跟上一题一样在源码中。果然,源...

  • Python挑战:04-05关

    Python Challenge Python Challenge 04 现在,我们来挑战第四关,从第三关的结果,...

  • [Python Challenge通关]第3关 re

    One small letter, surrounded by EXACTLY three big bodygua...

  • Python Challenge 第6关

    地址:http://www.pythonchallenge.com/pc/def/channel.html 代码 ...

  • Python Challenge 第5关

    地址:http://www.pythonchallenge.com/pc/def/peak.html 需要使用到的...

  • Python Challenge 第2关

    第2关 提示信息,在书或页面中找出字符。答案应该藏在页面源码中。 如下图所示,下载内容中提示在下方内容中找到稀有字...

  • Python Challenge 第0关

    Python Challenge 刷某乎的时候看到有推荐python编程跳转,感觉挺好玩的,就刷了一些,写篇帖子记...

  • Python Challenge 第1关

    第1关 根据图片可以看出每个字母往后推移了2步,得到后面的字母。后面给了一段话,嗯~~~ 意思很明显了,让我们根据...

  • Python挑战:00~03关

    Python Challenge Python Challenge 00 网址: http://www.pytho...

网友评论

      本文标题:Python Challenge 第3关

      本文链接:https://www.haomeiwen.com/subject/gxoljttx.html