python - Bigtable python客户端:如何检索大于给定值的最小行键
解决方案
这是你想要的?您需要先调整和测试此代码。
def prefixSuccessor(text, num):
# sort the text list
text.sort(reverse=True)
output = ""
# loop through the list
for i in range(num):
output += text[i]
return output
if __name__ == "__main__":
# list of words
text = ["ahty", "ghf", "hfy", "hfgt"]
# find the length
num = len(text)
# print output
print(prefixSuccessor(text, num))
推荐阅读
- excel-formula - 在excel中查找最大会计年度数据
- python - 如何在 Flask 中保存以前的 URL?
- python - 将 Python 中的非英语文本标记为句子
- vue.js - 如何在 vue.js 中为我的计算机、同事的计算机和生产指定不同的 API url?
- android - 重新启动应用程序时,我的 Sharedpreference 不保存
- python - 在python中逐行打印列表
- jquery - 在 Razor 环境中获取子节点文本
- html - 如何让输入框达到一定的长度?
- java - 将文件中的值添加到内部带有 Map 的 HashMap
- python - 程序检查密码强度(和/或运算符不工作/检查字符串中的符号?)