怎样在 Python 找到最大数据并输出

 时间:2024-10-13 13:22:05

1、首先,右键点击【项目】,创建一个【Python】文件

怎样在 Python 找到最大数据并输出

3、然后,复制代码粘贴到文件中if __name__ == '__main娄多骋能__': person = {"li": 18, "wang": 50, "zhang": 20, "sun": 22} m = 'li' for key in person.keys(): if person[m] < person[key]: m = key print '%s,%d' % (m, person[m])

怎样在 Python 找到最大数据并输出

5、最后,在最下面就可以看到运行结果了

怎样在 Python 找到最大数据并输出
  • python 列表转元组
  • python中如何获取列表的最大值和最小值?
  • python统计字符串中字母数字出现的次数
  • python创建列表
  • python取余数
  • 热门搜索
    fta是什么意思 火花塞什么牌子好 什么是小产权房子 什么是建筑工程技术 二垒是什么意思 什么东西吃不胖 dnf结婚有什么好处 空空如也的意思 mom是什么意思 相看两不厌只有敬亭山的意思