运算符 - 算数运算符 + - * # 加减乘 / # 小数商 // # 整数商 % # 余数 ** # 幂运算(5 ** 3 --> 5 * 5 * 5) 运算符 - 增强运算符 # 在算数运算符基础上,增加了为自身赋值的功能 += -= *= /= //= %= **= # data1 += 5 ...
分类:
编程语言 时间:
2021-04-23 12:22:46
阅读次数:
0
一、字符串的表示和存储 字符串是字符的序列,每个字符都有有一个数字作为标识,同时会有一个将标识转换为存储字节的编码方案; s = 'hello world python' for c in s: print(c, end=' ') h e l l o w o r l d p y t h o n AC ...
分类:
编程语言 时间:
2021-04-23 12:20:35
阅读次数:
0
一、讲解 二、代码 import tensorflow as tf from tensorflow.python.keras import datasets, layers, optimizers, Sequential, metrics from tensorflow.python import ...
分类:
其他好文 时间:
2021-04-23 12:19:22
阅读次数:
0
1. 用Pyspark自主实现词频统计过程。 >>> s = txt.lower().split()>>> dd = {}>>> for word in s:... if word not in dd:... dd[word] = 1... else:... dd[word] = dic[word] ...
分类:
其他好文 时间:
2021-04-23 12:19:08
阅读次数:
0
>>> s = txt.lower().split()>>> dd = {}>>> for word in s:... if word not in dd:... dd[word] = 1... else:... dd[word] = dic[word] + 1...>>> ss = sorted( ...
分类:
其他好文 时间:
2021-04-23 12:18:32
阅读次数:
0
1. 用Pyspark自主实现词频统计过程。 >>> s = txt.lower().split()>>> dd = {}>>> for word in s:... if word not in dd:... dd[word] = 1... else:... dd[word] = dic[word] ...
分类:
其他好文 时间:
2021-04-23 12:10:50
阅读次数:
0
详细步骤:(注:pip是Python包管理工具,该工具提供了对Python包的查找、下载、安装、卸载的功能。) 第一步:使用pip安装xpinyin包,具体命令如下: 1 pip install xpinyin -i http://pypi.douban.com/simple --trusted-h ...
分类:
编程语言 时间:
2021-04-23 12:10:10
阅读次数:
0
笔试算法题中,有时候是要自己处理输入,比如从键盘中接收一个数,整理了一些常用的,真正笔试之前可以看一看。 输入 循环输入: Scanner sc = new Scanner(System.in); while (sc.hasNextLine()){ String s = sc.nextLine(); ...
分类:
编程语言 时间:
2021-04-23 12:06:51
阅读次数:
0
概述 python 三目运算符 背景 最近看代码, 有人挺喜欢用这个东西 我虽然不喜欢, 但还是学学吧 我觉得这样虽然显得简洁, 但读起来并不是最友好的 简单记一下, 怕以后忘了 水一篇 环境 python 3.7 类型 总结类 1. 语法 概述 语法 例子 # 语法 # py 式的变量命名, 我觉 ...
分类:
编程语言 时间:
2021-04-23 12:05:15
阅读次数:
0
import os, zipfile def deflate(paths, zip_path): z = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED, allowZip64=True, compresslevel=9) for path i ...
分类:
编程语言 时间:
2021-04-23 12:03:14
阅读次数:
0