第九节 1,函数初始 s = "qwertyuiop"n = 0for i in s: n += 1print(n)lst = [1,2,3,4,5]n = 0for i in lst: n += 1print(n)tu = (1,2,3,4,5,6,7,8)n = 0for i in tu: n += 1print(n)dic = {1:12,4:115,6:7}n = 0for i in dic: n += 1print(n) 函数:将某个功能封装,到…
背景: 这两天不小心看了一下Swift的基础语法,感觉既然看了,还是写一下笔记,留个痕迹~ 总体而言,感觉Swift是一种前后端多种语言混合的产物~~~ 做为一名.NET阵营人士,少少多多总喜欢通过对比来加深认识. 所以做了一个简单的比较列表. 下面是基础语法的比较: Swift C#(4.0以上) 常量定义: let name=”cyq.data” Const name=”cyq.data”; 变量定义: 指定类型: var name=”cyq.data” var name:String=”c…
From https://developer.android.com/reference/java/net/HttpURLConnection.html HttpUrlConnection: A URLConnection with support for HTTP-specific features. See the specfor details. Uses of this class follow a pattern: Obtain a new HttpURLConnection by c…