# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import json


# -

list_result = []
with open('num_list.csv',encoding='utf-8') as f:
    sourceInLine=f.readlines()
    for line in sourceInLine:
        temp1=line.strip('\n')
        list_result.append(int(temp1))
#     document = f.read()
#     list_result=document.split("\n")# 以回车符\n分割成单独的行
#     length=len(list_result)
#   print(document)

list_result

max_num = max(list_result)

sum_num = sum(list_result)

sum_num

# +

import heapq
max_list = heapq.nlargest(3, list_result)

# +



result= {
	"Q1":"Hello world",
	"Q2": 100,
	"Q3":[]
}
with open ("result.json","w") as f:
	json.dump(result,f)

# -









StarcoderdataJupyterScriptsDedupFiltered