This action will force synchronization from Yonja/python100, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
#!/usr/bin/python# -*- coding: utf-8 -*-"""题目:按逗号分隔列表。1、join()函数:语法: 'sep'.join(seq)参数说明sep:分隔符。可以为空seq:要连接的元素序列、字符串、元组、字典上面的语法即:以sep作为分隔符,将seq所有的元素合并成一个新的字符串返回值:返回一个以分隔符sep连接各个元素后生成的字符串2、os.path.join()函数语法: os.path.join(path1[,path2[,......]])返回值:将多个路径组合后返回"""def fenge(L):sl = ','.join(str(n) for n in L)print sldef main():L = [1,2,3,4,5]fenge(L)if __name__ == '__main__':main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。