Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda : 4.5.11    typesetting : Markdown   code """ @Author : 行初心 @Date : 18-9-23 @Blog : www.cnblogs.com/xingchuxin @Gitee : gitee.com/zhichengji…
         Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda : 4.5.11    typesetting : Markdown   code """ @Author : 行初心 @Date : 18-9-23 @Blog : www.cnblogs.com/xingchuxin @Gitee : gitee.com/zhichengji…
         Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda : 4.5.11    typesetting : Markdown   code coder@Ubuntu:~$ source activate py37 (py37) coder@Ubuntu:~$ ipython Python 3.7.0 (default, Jun 28 2018, 13:1…
输出1-100中的偶数 效果图: 实现代码: for i in range(2,101,2): print(i,end = '\t') if(i == 34): print('\n') if (i == 68): print('\n') 解析: for循环的范围(range)可以指定三个参数,即列表创建的三个参数:起始数字.末尾数字.步长(数字间隔),for循环的本质就是创建一个数字列表,i使用列表中的数依次赋值,当列表最后一个数赋值给i循环结束.所以1-100中的偶数即为开始第一个数字是2,步…
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ 1 code name=['燃灯古佛','释迦摩尼佛','弥勒佛'] for item in name: print(item) 2 show ------------------------------------------博文的精髓,在技术部分,更在镇场一诗.Python是优秀的语言,值得努…
         Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda : 4.5.11    typesetting : Markdown   code """ @Author : 行初心 @Date : 18-9-24 @Blog : www.cnblogs.com/xingchuxin @Gitee : gitee.com/zhichengji…
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ 1 code aCollection=range(1,10,1) for item in aCollection: print(item) 2 show ------------------------------------------博文的精髓,在技术部分,更在镇场一诗.Python是优秀的语…
镇场诗: 诚听如来语,顿舍世间名与利.愿做地藏徒,广演是经阎浮提. 愿尽吾所学,成就一良心博客.愿诸后来人,重现智慧清净体.------------------------------------------code: #创建具有重复元素的列表 list1=list([1,2,3,4,5,5,6,6,6]) #将列表转成集合,重复的元素自动消除 set1=set(list1) #将元素转为列表 list1=list(set1) print(list1) #大合集,你看得懂吗,好看吗? 还是上面的…
示例 var scores = [24, 32, 17]; // A数组 var arrayLength = scores.length;// 数组的长度 //当i<arrayLength时,可以按顺序访问数组中的值 for (var i = 0; i < arrayLength; i++) { var B=scores[i];//调用数组中的值 println(B) } function println(a) { document.write(a+"<br>"…
         Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda : 4.5.11    typesetting : Markdown   code coder@Ubuntu:~$ source activate py37 (py37) coder@Ubuntu:~$ ipython Python 3.7.0 (default, Jun 28 2018, 13:1…