Python List
·
Python
리스트(list) 이전에 문자열을 논의할 때 파이썬에서 시퀀스의 개념을 소개했습니다. 리스트는 파이썬에서 시퀀스의 가장 일반적인 버전이라고 생각할 수 있습니다. 문자열과 달리 변경 가능합니다. 즉, 목록 내의 요소가 변경될 수 있습니다! 1. 리스트 선언 2. 리시트 인덱싱 및 슬라이싱 3. 리스트 기본 함수 4. 리스트 중첩 5. List Comprehension 소개 1. 리스트 선언 # Assign a list to an variable named my_list my_list = [1,2,3] 리스트는 대괄호 [ ] 와 리스트의 모든요소를 ​​구분하는 쉼표로 구성됩니다. my_list = ['A string',23,100.232,'o'] 리스트는 실제로 다른 객체의 유형을 보유할 수 있습니다. le..
Python Strings
·
Python
Strings 문자열은 Python에서 이름과 같은 텍스트 정보를 기록하는 데 사용됩니다. Python의 문자열은 실제로 시퀀스입니다. 즉, 기본적으로 Python은 문자열의 모든 요소를 ​​시퀀스로 추적합니다. 예를 들어 Python은 문자열 "hello'를 특정 순서의 문자 시퀀스로 이해합니다. 즉, 인덱싱을 사용하여 특정 문자(예: 첫 번째 문자 또는 마지막 문자)를 가져올 수 있습니다. In this lecture we'll learn about the following: 1.) Creating Strings 2.) Printing Strings 3.) String Indexing and Slicing 4.) String Properties 5.) String Methods 6.) Print Fo..
Pyton 객체와 데이터 구조 기초
·
Python
Test your knowledge. ** Answer the following questions ** Write (or just say out loud to yourself) a brief description of all the following Object Types and Data Structures we've learned about. You can edit the cell below by double clicking on it. Really this is just to test if you know the difference between these, so feel free to just think about it, since your answers are self-graded. Numbers..