Python/Python with Error
[해결 방법] SyntaxError: invalid syntax
HJ0216
2023. 8. 6. 21:13
728x90
👉 기본 환경
- Language: Python
- IDE: Replit
⌨️ 코드
1
2
|
1input = input("What is your name?")
|
🖨️오류
SyntaxError: invalid syntax
📡 원인
변수의 시작 글자는 숫자일 수 없음
📰 해결 방법
1
2
3
|
input1 = input("What is your name?")
_1input = input("What is your name?")
|
변수의 시작 글자를 문자 또는 _로 변경
728x90