Skip to content

Instantly share code, notes, and snippets.

View good-old-times's full-sized avatar

good old times good-old-times

View GitHub Profile
BQS?83\N-?F"VB?EHl+RA7f[nFa#ZYFC]8HGB#6FD/<c9Ecj$E@p3h,0R?e
76!n,/Q>\:3A!-F2GGbr:.A58=[PnQ/Oru86N
@good-old-times
good-old-times / __main__.py
Created September 13, 2018 11:08
The teacher asks me for this code. The sorting of words in somefile using array, for, sorted(), open()
import sys
data = []
datalen = 0
with open(sys.argv[1],'r') as f:
for line in f:
for word in line.split():
datalen=datalen+1
data.insert(datalen, " "+word)
print("Array data: (NO SORTING)")
print(data)
Hello, World