J
J
Jamah12021-08-26 14:29:38
Python
Jamah1, 2021-08-26 14:29:38

When running a python script in the terminal, it gives a syntaxerror error, how to fix it?

I'm trying to run a script on the command line. As a matter of fact should produce only values. But immediately gives a syntax error, swears at the symbol: >>>
How to fix? Or maybe I'm writing the command incorrectly
61277a76732ec241400450.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2021-08-26
@Jamah1

It's easy to say. And imagine that there is a code of 100 lines, should I edit each line?

1. 100 lines can be viewed in a minute.
2. It is necessary to read the error more carefully, for the lazy it is written there that File "script1.py", line 1
That is, both the file and the line number.
3.
I need a solution, not crutches

A syntax error is the easiest thing to fix. What solution is needed? so that telepaths can guess what is written on line 1 in your file?
You didn't bring the file, just an error.
Carefully look at your code, read the documentation.

A
Aleksandr, 2021-08-26
@QQQ-RRR

The error speaks for itself, remove ">>>"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question