* NATO Ponetic Alphabet이 정의된 csv를 이용함. #TODO 1. using csv file, Create a dictionary in this format like: #{"A": "Alfa", "B": "Bravo"} data = pandas.read_csv("./nato_phonetic_alphabet.csv") data_dict_comprehension = { row.letter:row.code for (index,row) in data.iterrows() } #print(data_dict_comprehension) #TODO 2. Create a list of the phonetic code words from a word that the user inputs. word = i..
new_dict = { new_key : new_value for item in list } new_dict = { new_key : new_value for (key, value) in dict.items() } new_dict = { new_key : new_value for (key, value) in dict.items() if test } >> item은 속성값이 아니므로 item() 괄호를 반드시 붙여야 함 ex) names 리스트와 random 점수를 이용해 student_scores 딕셔너리를 이름, 점수로 생성 import random names = ['Alex', 'Kio', 'Freebee', 'Susan', 'Dave', 'Caroline', 'Beth', 'Freddie'] stu..
ex) 리스트의 값들을 1씩 더한 리스트를 만들때 numbers = [1,2,3] #1. 지금까지 방법 예 new_numbers = [] for num in numbers: add_1 = num + 1 new_numbers.append(add_1) #2. List Comprehension #new_list = [ new_item for item in list ] new_numbers = [ num+1 for num in numbers ] --------------------------------------------------------- print(new_numbers) [2, 3, 4] ex) name = "Kio" for i in name: print(i) -------------------- K ..

*weather_data.csv (데이터파일) day,temp,condition Monday,12,Sunny Tuesday,14,Rain Wednesday,15,Rain Thursday,14,Cloudy Friday,21,Sunny Saturday,22,Sunny Sunday,24,Sunny *csv파일을 열고 각 라인을 읽어서 공백/특수기호 제거하고 data 리스트에 넣기 data = [] with open("./weather_data.csv") as csv_data: contents = csv_data.readlines() for line in contents: data.append(line.strip()) print(data) ['day,temp,condition', 'Monday,12,Sunny'..
*starting_letter.txt Dear [name], You are invited to my birthday this Saturday. Hope you can make it! - kio - *invited_names.txt Aang Zuko Appa Katara Sokka Momo Uncle Iroh Toph [name] 위치에 invited_names 각 이름으로 대체, *main.py with open("./Input/Letters/starting_letter.txt") as letter_file: letter_contents = letter_file.read() for name in open("./Input/Names/invited_names.txt"): stripped_name = name..
*main.py from turtle import Screen from snake import Snake from food import Food from scoreboard import Scoreboard import time screen = Screen() screen.setup(width=600, height=600) screen.bgcolor("black") screen.tracer(0) screen.title("kio's snake game - ver.20220223(the first one)") snake = Snake() food = Food() scoreboard = Scoreboard() screen.listen() screen.onkey(snake.up, "Up") screen.onkey..
- Total
- Today
- Yesterday
- dp-2
- sysprep
- Join
- powershell
- fromkeys
- dp-1
- powercli
- storage
- oracle
- 3par
- dezoomify
- 부동없이
- 읽어오기
- EXA
- virt-sysprep
- 대소문자
- 정렬
- set()
- 차집합
- 스토리지
- vmware
- insert
- cloud-init
- 중복제거
- artandculture
- 변수화
- exadata
- LIST
- 배열
- vmware.powercli
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |