Answer the question
In order to leave comments, you need to log in
How to bring a table into a certain form (python)?
Hello! I parse the page and get this data format.
18.
17.
Arsenal
22
11
11
34:25
2.7
?
-
-
+
+
+
18.
Burnley
21
8
13
17:29
2.2
?
-
-
-
-
+
19.
Brighton
23
5
18
25:23
2.1
?
-
-
-
-
+
20.
Wolves
23
5
18
21:17
1.7
?
-
-
+
+
-
If the teams score the same number of points, then the places in the table will be determined by the goal difference.
Arsenal - - + + +
Burnley - - - - +
Brighton - - - - +
Wolves - - + + -
Answer the question
In order to leave comments, you need to log in
какими методами python можно воспользоваться, чтобы привести данные к формату:
for
, comparison if
, output print
, well, a method isalpha()
to understand where the line is. Well, for starters, the question is where you are parsing from, and how the necessary blocks are formed there, it seems that you are parsing the contents of just these blocks, then you can get blocks with minuses from each record and concatenate with the name of the command, and not display them separately
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question