분류 전체보기823 0212. Reversed sequence Build a function that returns an array of integers from n to 1 where n>0. Example : n=5 --> [5,4,3,2,1] Solution: reverse_seq = lambda n: sorted(range(1, n+1), reverse=True) def reverseseq(n): return list(range(n, 0, -1)) 2023. 2. 13. 행동을 쓰자 행동을 쓰자 앞으로의 내 글쓰기를 새롭게 정의해보려 한다. 아이디어는 단순하다. 내가 실제로 행동한 것들을 글로 쓰는 것이다. 지금까지 1년 넘게 블로그를 운영하면서 여러 가지 글을 써보았다. 처음에는 ‘공부한 내용을 정리하는 글’을 주로 써왔고 어느 시점부터는 프로젝트나 주간 회고, 내 생각을 정리한 사색 글도 쓰기 시작했다. 글을 쓰는게 어느 정도 익숙해지니 이제는 새로운 고민을 하게 되었다. 퀄리티 높은 다른 수많은 글들 사이에서 내 글을 어떻게 ‘차별화’할 수 있을까? ChatGPT의 등장 최근 ChatGPT 의 등장으로 느슨해진 기술 블로그 씬에 긴장감이 돌기 시작했다. 이제는 모르는 게 생기면 구글링보다 ChatGPT에게 먼저 물어본다. ChatGPT 가 항상 정답을 내놓는 것은 아니지만 그럼.. 2023. 2. 12. 0211. Remove duplicates from list Define a function that removes duplicates from an array of numbers and returns it as a result. The order of the sequence has to stay the same. Solution: def distinct(seq: list[int]) -> list[int]: result = [] for i in seq: if i not in result: result.append(i) return result def distinct(seq: list[int]) -> list[int]: return sorted(set(seq), key=seq.index) def distinct(seq: list[int]) -> list[int]: .. 2023. 2. 12. 2023년 6주차 '웹툰 연재를 시작했다' 사내 인사이트 모임 시작 작년부터 시즌별로 사내 인사이트 모임을 열고 있다. 인사이트 모임은 일주일에 한 번 각자 콘텐츠를 소비하고 거기서 얻은 인사이트를 오프라인으로 공유하는 모임이다. 보통 한 번 모임에 6명 정도 참여하는데 직군 상관없이 참여하다 보니 다양한 관점과 경험들을 나눌 수 있다. 이번 모임에서 새롭게 도입한 것은 '칭호' 시스템이다. 4주간 열리는 모든 모임에 참석하면 특정 칭호를 획득할 수 있고, 이를 본인 소개페이지에(우리 회사는 자기소개 페이지가 있다) 획득한 칭호를 달 수 있다. 재미있는 건 다들 이 칭호에 큰 관심을 가지더라는 것이다. 심지어 1회차에 참석한 한 동료분은 이 칭호를 얻기 위해 참석했다고 말할 정도다. 물론 '말랑말랑 트롤리언'이라는 칭호를 받는다고 해서 회사는 어.. 2023. 2. 11. 0210. Is it a number? Given a string s, write a method (function) that will return true if its a valid single integer or floating number or false if its not. Valid examples, should return true: isDigit("3") isDigit(" 3 ") isDigit("-3.23") should return false: isDigit("3-4") isDigit(" 3 5") isDigit("3 5") isDigit("zero") Solution: def isDigit(string: str) -> bool: return string.strip().lstrip("-").replace(".", "").isd.. 2023. 2. 10. 0209. Sort the Gift Code Happy Holidays fellow Code Warriors! Santa's senior gift organizer Elf developed a way to represent up to 26 gifts by assigning a unique alphabetical character to each gift. After each gift was assigned a character, the gift organizer Elf then joined the characters to form the gift ordering code. Santa asked his organizer to order the characters in alphabetical order, but the Elf fell asleep fro.. 2023. 2. 9. 이전 1 ··· 22 23 24 25 26 27 28 ··· 138 다음