2018年1月6日
摘要: #!usr/bin/python#-*-coding:gbk-*-#列表list'''可以看到a b c 三个是同一id值,当改变当中任一列表元素的值后,三者会同步改变。但d的元素值不会变,改变d的元素值其它三个变量内的元素值也不会变.从a b c d 的id值来看,a b c 地址全一样,唯有d分 阅读全文
posted @ 2018-01-06 19:20 red_rose 阅读(752) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #Python3 字符串#可以截取字符串的一部分并与其他字段拼接var1 = 'Hello World!'print ("已更新字符串 : ", var1[:6] + 'Runoob!')'''python三引号允许一个字符串跨多行,字符串中可以包含换行符、制表符 阅读全文
posted @ 2018-01-06 19:09 red_rose 阅读(633) 评论(0) 推荐(0) 编辑
  2018年1月2日
摘要: '''python 没有自增运算符python 中,变量是以内容为基准而不是像 c 中以变量名为基准,所以只要你的数字内容是5,不管你起什么名字,这个变量的 ID 是相同的,同时也就说明了 python 中一个变量可以以多个名称访问。'''numa = 5numb = 5print(id(numa) 阅读全文
posted @ 2018-01-02 09:50 red_rose 阅读(194) 评论(0) 推荐(0) 编辑
  2017年12月30日
摘要: 1、使用:sudo passwd root设置root的密码,如下图所示: 2.使用su root来测试是否可以进入root用户,如果出现#说明已经设置root用户的密码成功,如下图所示: 3.进入到/usr/share/lightdm/lightdm.conf.d/目录,使用gedit 50-un 阅读全文
posted @ 2017-12-30 20:45 red_rose 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 十招让Ubuntu 16.04用起来更得心应手 Ubuntu 16.04 LTS的这十项新功能,每个Ubuntu用户必须要知道! Ubuntu 16.04 LTS安装好需要设置的15件事 阅读全文
posted @ 2017-12-30 18:07 red_rose 阅读(518) 评论(0) 推荐(0) 编辑
摘要: Ubuntu 16.04发布了,带来了很多新特性,同样也依然带着很多不习惯的东西,所以装完系统后还要进行一系列的优化。 1.删除libreoffice libreoffice虽然是开源的,但是Java写出来的office执行效率实在不敢恭维,装完系统后果断删掉 ? 1 sudo apt-get re 阅读全文
posted @ 2017-12-30 18:00 red_rose 阅读(27952) 评论(0) 推荐(1) 编辑
  2017年12月28日
摘要: #标准数据类型——number(数字)a, b, c = 1, 2.2, "hello"print(a, end = ", ")print(b, end = ", ")print(c)print(isinstance(a, int))print(isinstance(c, str))print(ty 阅读全文
posted @ 2017-12-28 18:15 red_rose 阅读(157) 评论(0) 推荐(0) 编辑
摘要: '''python保留字即关键字,我们不能把它们用作任何标识符名称。Python 的标准库提供了一个 keyword 模块,可以输出当前版本的所有关键字: '''>>> import keyword>>> keyword.kwlist['False', 'None', 'True', 'and', 阅读全文
posted @ 2017-12-28 18:14 red_rose 阅读(188) 评论(0) 推荐(0) 编辑
  2017年12月27日
摘要: 1.什么是junit5? 和之前的junit版本不一样,junit5是由三个模块组成。 JUnit 5 = JUnit Platform + JUnit Jupiter + JUnit Vintage。 JUnit Platform是在jvm上启动测试框架的基础,定义了测试引擎的API,可以在cmd 阅读全文
posted @ 2017-12-27 23:15 red_rose 阅读(2298) 评论(0) 推荐(0) 编辑
  2017年12月26日
摘要: 1.print "hello world!";SyntaxError:Missing parentheses in call to ‘paint’ . Did you mean print(“hello world”);? 在调用“paint”时缺少圆括号。 上面的语法在python3中是错误的。在 阅读全文
posted @ 2017-12-26 11:29 red_rose 阅读(306) 评论(0) 推荐(0) 编辑