Notice
Recent Comments
Link
Tags
- node js express install
- 디지털오션 드로플릿
- java 숫자를 문자로 변환하기
- Node.js express install
- express install
- 우분투 시간변경
- 클라우드서버 생성
- 파이썬 반복문
- 파이썬
- 우분투 node js 설치
- ubuntu node js
- node js 버전확인
- 자바 파일 한줄씩 읽기
- tzselect
- 자바 한줄씩 읽기
- 우분투 시간설정
- npm버전확인
- 라즈베리파이4
- node 버전확인
- raspi-config
- mysql index 생성
- Ubuntu timezone
- c file read
- index 생성
- C언어
- 디지털오션 서버생성하기
- Python
- ubuntu node js install
- c언어 파일 읽기
- 디지털오션 클라우드서버 생성하기
Archives
- Today
- Total
호그래머
Python Lists 사용하기 23.06.27 본문
728x90
1. Python에서 Lists 사용하기
fruits=['apple', 'banana', 'lemon', 'cherry', 'pear', 'grapes']
print(fruits)
print(fruits[0])
print(fruits[5])
print(fruits[-2])
print(fruits[2:])
print(fruits[1:3])
리스트는 0부터 시작
결과
끝
1. Python에서 Lists를 사용할 수 있다.
2. Lists의 시작은 0부터 시작한다.
728x90
'Python' 카테고리의 다른 글
Python while 사용하기 23.06.27 (0) | 2023.06.27 |
---|---|
Python for 사용하기 23.06.27 (0) | 2023.06.27 |
Python if 사용하기 23.06.26 (0) | 2023.06.27 |
Python text 파일 읽기 - 방법1 (파일읽기) 23.06.25 (0) | 2023.06.25 |
Python text 파일 쓰기 - 방법1 (파일쓰기) 23.06.25 (0) | 2023.06.25 |
Comments