Modify and Search #21464
-
Hello. I want to modify and sort but it’s only modifying why is it not searching?
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi, it’s hard to help without knowing what exactly is wrong. Like, exactly what output do you get, and what would you expect? Also the code is hard to read like this, please enclose it in a markdown code block so indentation is preserved, like this:
The
|
Beta Was this translation helpful? Give feedback.
-
hello, thank you for the respond. |
Beta Was this translation helpful? Give feedback.
-
I’m afraid that’s not enough detail. To help we’d need to know exactly (as in, actual content!) how your input file looks, what output you get, and what you want to get. Also, please edit your first post to use a code block as I described above. Otherwise the code is unreadable. |
Beta Was this translation helpful? Give feedback.
-
hello, i have edit it thank you. and that’s how my text file looks like |
Beta Was this translation helpful? Give feedback.
-
I think the main issue is that when writing out the results you use That said, I think the code above is not exactly what you use, because |
Beta Was this translation helpful? Give feedback.
-
thank you so much!! i didn’t notice it. |
Beta Was this translation helpful? Give feedback.
I think the main issue is that when writing out the results you use
std_records
, notnew_list
, which seems to be supposed to hold the sorted data.That said, I think the code above is not exactly what you use, because
new_list
is used before being assigned to, which should crash with aNameError
.