摘要: 链接:http://www.runoob.com/python/python-exercise-example33.html 题目:按逗号分隔列表。 思考: 可以用join函数! sequence可以是list\tuple等。 str是链接符。 返回值是一个链接好了的字符串。 阅读全文
posted @ 2018-06-19 10:12 Drifter_y 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 链接:http://www.runoob.com/python/python-exercise-example32.html 题目:按相反的顺序输出列表的值。 我的代码: 或者 reverse只是对li进行操作,没有返回值。如果print(li.reverse()) 只会输出None。 阅读全文
posted @ 2018-06-19 09:52 Drifter_y 阅读(401) 评论(0) 推荐(0) 编辑