Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- computer science
- 프로그래머스
- 미래혁신대전
- 멀티스레딩
- SQL
- Stored Procedure
- Django
- stored function
- 선형대수
- 문제풀이
- 다시 왔다!
- 혼자 공부하는 SQL
- Til
- 1463
- 2023
- 컴퓨터 과학이 여는 세계
- 퓨처셀프
- WIL
- 엘런 튜링
- 덴드로그램
- PCA
- CS
- JP Study
- 한 권으로 읽는 컴퓨터 구조와 프로그래밍
- mysql
- Programmers
- 백준
- Recommender system
- MVT
- FastAPI
Archives
- Today
- Total
Growth Hoon
20231125_TIL_{Python : [ Django 연습, Programmers 문제], JPstudy : [ 장철원 강사님과의 미팅 ] } 본문
TIL_Today I Learned
20231125_TIL_{Python : [ Django 연습, Programmers 문제], JPstudy : [ 장철원 강사님과의 미팅 ] }
sayhoon 2023. 11. 25. 23:04Django 연습
github에 올려 두었다 !
https://github.com/JSeHoone/TIL/tree/main/django_practice
- 이후에 다시 볼 때 History 확인해보자 !
Programmers 문제 - 카드 뭉치
# 카드 뭉치
def solution(cards1, cards2, goal):
answer = 'Yes'
for word in goal:
if (len(cards2) == 0) & (len(cards1) != 0): # cards2번 리스트가 빈값이 된 경우
if word == cards1[0]:
del cards1[0]
else:
answer = 'No'
break
elif (len(cards1) == 0) & (len(cards2) != 0): # cards1번 리스트가 빈 값이 된 경우
if word == cards2[0]:
del cards2[0]
else:
answer = 'No'
break
else: # 모든 카드 뭉치에 word가 있는 경우
if word == cards1[0]:
del cards1[0]
elif word == cards2[0]:
del cards2[0]
else:
break
return answer
print(solution(["i", "drink", "water"], ["want", "to"], ["i", "want", "to", "drink", "water"]))
print("="*100)
print(solution(["i", "water", "drink"] , ["want", "to"],["i", "want", "to", "drink", "water"] ))
- if문을 잘 짜둬서 통과 한 것 같다 !..
JPstudy
장철원 강사님과 스터디 소개와 자기소개를 했고, 많은 인사이트를 얻었다
내가 나중에 성장하고 이 일에 대한 보답을 드리고 싶었다
(물론 스터디장에게도 감사를 표한다 !)
오늘 하루 많은 공부는 하지 않았지만 많은 인사이트를 얻고, 자신감을 얻은 날이 된 것 같다
( 을지로 입구역에서 지하철에 내리는데 왜 여성의 비율이 높은지에 대해서 궁금했다 (?) )