上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页
摘要: 1、切片操作#!/usr/bin/env python# -*- coding: utf-8 -*-# 切片操作names = ('aa','bb','cc','dd','ee');print names[0];print names[2];print na... 阅读全文
posted @ 2017-12-04 14:26 crr121 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1、切片操作#!/usr/bin/env python# -*- coding: utf-8 -*-# 切片操作names = ('aa','bb','cc','dd','ee');print names[0];print names[2];print na... 阅读全文
posted @ 2017-12-04 14:26 crr121 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1、复数aComplex = -1.33 + 2.44j;print aComplex;# (-1.33+2.44j)print aComplex.real;print aComplex.imag;# -1.33# 2.44print aComplex.co... 阅读全文
posted @ 2017-12-04 11:45 crr121 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1、复数aComplex = -1.33 + 2.44j;print aComplex;# (-1.33+2.44j)print aComplex.real;print aComplex.imag;# -1.33# 2.44print aComplex.co... 阅读全文
posted @ 2017-12-04 11:45 crr121 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1、模式匹配 match caseobject controllAbstract { def main(args: Array[String]): Unit = { val x:Any="123"; x match { case a:... 阅读全文
posted @ 2017-11-30 09:46 crr121 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 1、模式匹配 match caseobject controllAbstract { def main(args: Array[String]): Unit = { val x:Any="123"; x match { case a:... 阅读全文
posted @ 2017-11-30 09:46 crr121 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1、空集合Nil,以及右结合object controllAbstract { def main(args: Array[String]): Unit = { //向空集合Nil中添加元素 //双冒号是右结合 // println((1::... 阅读全文
posted @ 2017-11-29 10:48 crr121 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1、空集合Nil,以及右结合object controllAbstract { def main(args: Array[String]): Unit = { //向空集合Nil中添加元素 //双冒号是右结合 // println((1::... 阅读全文
posted @ 2017-11-29 10:48 crr121 阅读(107) 评论(0) 推荐(0) 编辑
摘要: map的方法filter 3、object gaojie { def main(args: Array[String]): Unit = { (1 to 10).map("*" * _).foreach(println _); //数组1... 阅读全文
posted @ 2017-11-28 10:48 crr121 阅读(93) 评论(0) 推荐(0) 编辑
摘要: map的方法filter 3、object gaojie { def main(args: Array[String]): Unit = { (1 to 10).map("*" * _).foreach(println _); //数组1... 阅读全文
posted @ 2017-11-28 10:48 crr121 阅读(177) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页