半臻 半臻
3年前
Python基础2——类型转换、深浅拷贝、函数
8、类型转换、深浅拷贝8.1数据转换数据类型int整型float浮点数bool布尔值complex复数str字符串list列表tuple元组dict字典set集合python类型转换int()numint("123")ifnum123:print("等于123")num123nstr(num)
Wesley13 Wesley13
3年前
MySQL ROUND函数:四舍五入
MySQL(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fc.biancheng.net%2Fmysql%2F) ROUND(x)函数返回最接近于参数x的整数;ROUND(x,y)函数对参数x进行四舍五入的操作,返回值保留小数点后面指定的y位。【实例1】使用ROUN
Stella981 Stella981
3年前
Python技巧之拉姆达(Lambda)函数
Python中的‘lambda’关键字提供了一个便捷的途径去声明短小并匿名的函数。ThelambdakeywordinPythonprovidesashortcutfordeclaringsmallandanonymousfunctions:addlambd
Wesley13 Wesley13
3年前
JS 获取数组某个元素下标 函数方法
/获取某个元素下标arrays:传入的数组obj:需要获取下标的元素/functioncontains(arrays,obj){variarrays.length;w
Stella981 Stella981
3年前
Python 函数为什么会默认返回 None?
点击蓝色“Python空间”关注我丫加个“星标”,每天一起快乐的学习!(https://oscimg.oschina.net/oscnet/2eb7387ad87b4685a8b2a60f61773c78.jpg)Python有一项默认的做法,很多编程语言都没有——它的所有函数都会有一个返回值,不管你有没有写retur
Stella981 Stella981
3年前
JavaScript 学习笔记十二 函数式编程风格
//Util.jsfunctionabs(x){returnx0?x:x;}functionadd(a,b){returnab;}functionsub(a,b){returnab;}functionmul(a,b){returnab;}function
Wesley13 Wesley13
3年前
C++中的显式构造函数
 有如下一个简单的复数类:classClxComplex{public:ClxComplex(doubledReal0.0,doubledImage0.0){m_dRealdReal;dImagedImage;}doubleGetReal(
Stella981 Stella981
3年前
Go 语言 bytes.FieldsFunc 函数的使用
packagemainimport("bytes""fmt""reflect""strings")funcmain(){sentence:byte("TheGolanguagehasbuiltinfac
Stella981 Stella981
3年前
Json模块dumps、loads、dump、load函数介绍
转自:http://blog.csdn.net/mr\_evanchen/article/details/77879967Json模块dumps、loads、dump、load函数介绍1、json.dumps()     json.dumps()用于将dict类型的数据转成str,因为如果直接将dict类型的数据写入
Wesley13 Wesley13
3年前
Java学习(5)——字符串常用函数
不是我写的太麻烦了转自:https://www.cnblogs.com/nanshouyong326/archive/2009/06/30/1513920.html(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fwww.cnblogs.com%2Fnanshouyong326%