Created
August 4, 2020 01:36
-
-
Save chiehpower/23eed8c60482e9284aaa16231e010cff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import xlwt | |
book = xlwt.Workbook(encoding="utf-8") | |
sheet1 = book.add_sheet("Sheet1") | |
def main(orig_args, data): | |
filename = "speed_time.xls" | |
output(filename, data) | |
def output(filename, data): | |
for i in range(len(data)): | |
sheet1.write(0, i, data[i]) | |
book.save(filename) | |
if __name__ == '__main__': | |
data = [4.587441444396973, 0.6879658699035645, 0.7429850101470947, 0.7089877128601074, 0.6919889450073242, 0.6779735088348389, 0.6699743270874023, 0.6809675693511963, 0.6799864768981934, 0.6669859886169434, 0.6939675807952881, 0.6769862174987793, 0.6789898872375488, | |
0.6669893264770508, 0.6689667701721191, 0.6759858131408691, 0.6750063896179199, 0.6649978160858154, 0.6759665012359619, 0.669999361038208, 0.6629860401153564, 0.6919703483581543, 0.7079801559448242, 0.6989660263061523, 0.7769887447357178, 0.7129843235015869, 0.7079648971557617] | |
b = [] | |
for i in data: | |
b.append(round(i, 4)) | |
main(sys.argv, b) |
Author
chiehpower
commented
Dec 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment