- java 숫자를 문자로 변환하기
- c file read
- C언어
- 우분투 node js 설치
- c언어 파일 읽기
- Python
- 디지털오션 드로플릿
- 클라우드서버 생성
- ubuntu node js install
- mysql index 생성
- raspi-config
- 파이썬 반복문
- ubuntu node js
- 자바 한줄씩 읽기
- tzselect
- 우분투 시간설정
- node 버전확인
- node js 버전확인
- npm버전확인
- 디지털오션 클라우드서버 생성하기
- 라즈베리파이4
- node js express install
- 파이썬
- Node.js express install
- 자바 파일 한줄씩 읽기
- index 생성
- express install
- 우분투 시간변경
- 디지털오션 서버생성하기
- Ubuntu timezone
- Today
- Total
목록Python (5)
호그래머

1. Python에서 while문 사용하기 i=1 while i < 10: print(i) i=i+1 print("while 끝!") 결과 끝 1. Python에서 쉽게 while문을 사용할 수 있다.

1. Python에서 for문 사용하기 for item in range(10): print(item) print("첫번 째 포문 끝!") for item in range(6,10): print(item) print("두번 째 포문 끝!") for item in range(6,10,2): print(item) print("두번 째 포문 끝!") 결과 끝 1. Python에서 쉽게 for문을 사용할 수 있다.

1. Python에서 if문 사용하기 is_alive=True name="Ben" age=99 if is_alive: print("트루") else: print("펄스") if name=="Ben": print(name) elif name=="Dan": print(name) if age==99: print(age) elif age==98: print(age) elif age==97: print(age) 결과 끝 Python에서 if문을 사용 할 수있다.

1. python text파일 읽기 file_path = "D:/WORK/Python/티스토리/230625/test.txt" with open(file_path, "r") as file: file_content = file.read() print("파일 읽기 완료") print(file_content) 결과 끝 Python으로 text파일을 쉽게 읽을 수 있다.

1. Python text 파일로 쓰기 txt_file_path = "D:/WORK/Python/티스토리/230625/test.txt" # 텍스트 파일 열기 (쓰기 모드) with open(txt_file_path, "w") as file: # 파일에 내용 쓰기 file.write("ABCDE \n") file.write("가나다라마 \n") file.write("12345") print("파일 쓰기 완료") 해당경로에 test.txt파일이 생성됩니다. 끝 1. 파이썬에서 쉽게 텍스트를 파일로 쓸 수 있다.