210512_웹 크롤링2
복습! (list 객체를 txt파일로 저장) def Test(): listdata = [2, 2, 1, 3, 8, 5, 7]; result = sorted(listdata) #리스트의 요소를 정렬한다. print(result) #[1,2,2,3,5,7,8] f = open("c:\\data\\mydata11.txt", "w") #mydata11.txt를 생성하겠다 f.write(str(result)) #result에 있는 내용을 mydata11.txt로 생성한다. f.close() #result 에 있는 내용을 문자로 변환 해야한다. def Test01(): #아래의 리스트를 mydata12.txt로 저장하시오! listdata2 = ['a','b','c','d','e','f','g'] result = ..
2021. 5. 12.