Home > database >  Python problem solving
Python problem solving

Time:11-10

With the open (" PY301 - SunSign. CSV ", "r") as f:
While True:
X=input (" please enter the serial number (5), for example, constellation: ")
N=x.s plit ()
Ls=[]
For the line in f:
Ls. Append (line. The strip (' \ n '). The split (', '))
For a row in the ls:
If the row [0] in n:
Print (" {} {} ({}) birthday is on the solstice {} {} on {} day ". The format (row [1], the row [4], the row [2], [: - 2] row [2] [- 2:], row [3], [: - 2] row [3] [- 2:)))


Excuse me why use while true implementation to re-enter state will appear problem, solving

CodePudding user response:

Finished traversal is wrong

CodePudding user response:

reference 1st floor shoppo0505 response:
finished traversal is wrong

Have the solution, should open the file of the statements in the loop
  • Related