博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hausaufgabe--python 20-Closure functions 2
阅读量:6943 次
发布时间:2019-06-27

本文共 859 字,大约阅读时间需要 2 分钟。

000-- to calculate specific letters in a string

 

 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 There is error for above codes 

Reffered:the path to open a file: http://www.cnblogs.com/xubing-613/p/6260346.html

to statistic the specific in the string: http://blog.csdn.net/granton/article/details/38664579

 

Standar answer: -_-|| so short......

 

 

 

001-- to change the global value in the closure function, use " global "

 

 

 002-- to change the same varial in another function, use "nonlocal"

 

 

003-- nested functions:

 

 

 

updated to :

 

 

004-- to access the inner functions

 

 

 

 

005 -- define a function, to find the small case letter which have 3 upper letter before and after it. 

 

 

 

 

running result:

 

转载于:https://www.cnblogs.com/Shareishappy/p/7058272.html

你可能感兴趣的文章
linux系统中定义的信号
查看>>
大厂h5开源视频系列-网易云音乐年度总结
查看>>
Android-再次解读萤石云视频
查看>>
webpack 代码gzip压缩、注释、警告去除配置,设置缓存
查看>>
Android 实现自定义圆环
查看>>
Xcode实现彩色控制台
查看>>
macOS Sierra 10.12+ 软件提示已损坏,移除到废纸篓的解决方法
查看>>
Istio 庖丁解牛一:组件概览
查看>>
从0带您打造企业级 Vue 服务器渲染 Nuxt.js (一) 入门
查看>>
vue watch数组引发的血案
查看>>
LAMP和LNMP深度优化
查看>>
(三)Python的List和Tuple类型
查看>>
近期面试题整理
查看>>
1.编辑器 - Visual Studio Code
查看>>
MDKAutoLayoutHeight 自动化UITableviewCell高度计算工具
查看>>
JS 事件机制 Event Loop
查看>>
简历上的项目经历怎么写 ?这 3 条原则不可忽视 !
查看>>
Python:鲜为人知的功能特性(下)
查看>>
正则表达式
查看>>
基于python flask编写测试平台系列之·(1)当前项目展示
查看>>