![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Feify@肥肥
软件工程师
我得开源库https://github.com/wligang
网站:https://wlgdo.com
展开
-
python基础语法-实现九九乘法表
初步学习python语法基础的时候最好以某些简单的算法或者场景作为模型来学习,比如九九乘法表就很有代表性: 如下代码:def jiujiu(y=None): x = y = 1 while (x <= 9): while y <= x: v = "" + str(y) + "*" + str(x) + &qu原创 2018-06-29 16:29:06 · 634 阅读 · 0 评论 -
一瓶汽水1块钱,3个瓶盖换一瓶汽水,2个空瓶换一瓶汽水,假如手里有5块钱,能喝多少瓶汽水
用三种方式实现以下命题: 一瓶汽水1块钱,3个瓶盖换一瓶汽水,2个空瓶换一瓶汽水,假如手里有5块钱,能喝多少瓶汽水java/**已喝掉*/static int sodaDrinked = 0;/**汽水*/static int soda = 5;/**瓶盖*/static int cap = 0;/**空瓶*/static int emptyBottle = 0;pu...原创 2018-07-26 21:56:07 · 3615 阅读 · 0 评论 -
python如何将数组(元组)转字符串
如何讲python中的数组转成字符串如果是数字数组,需要进行转化如下array=[1,2,3,4]str_array=",".join(map(str, array))print(str_array)运行结果为: 1,2,3,4’...原创 2018-08-08 13:02:20 · 20543 阅读 · 7 评论