下面的列表是我想从哪里得到的文本纯粹,并希望删除所有无用的单词从它像“数组”,"data_type“等。我只是想从下面的列表文本,我的代码不工作。只要告诉我怎么做,并分享代码就可以了。列表如下:
['(array([list([\'The Unsettling Immobility Of Jack Crawford | Neculai Fantanaru (en)\'])],\n dtype=object), array([\'The storm of exasperation unleashes with an unstoppable force over Jack Crawford, leader of the "Behavioral Science Unit"within the FBI. An inner shake is followed by the formidable noise of the friction between elements and the energy gathered in the only stage of the fight against negative thoughts. They’re there because of the inability to cope with the tricky case of "Buffalo Bill." This unseen, unknown criminal is looking for new victims. And all the blame is put on the shoulders of the person leading the investigation.\'],\n dtype=\'<U649\'))']
['(array([list(["Test your ability to practice an opening towards new self-knowledge horizons, so that your evolution won\'t be placed under the auspices of a somber ending."])],\n dtype=object), array([\'The whole evolution and performance of Jack Crawford seems to be placed under the auspices of a somber ending. Is he still the qualified person for this mission to identify the sick human type who brings disadvantages to society? Can he still reach in the unreachable and set the oscillations of manifestations and behavioral formulae for the murderous ghost who shamelessly haunts, with its intrigues, with its uncommon force, every single place?\'],\n dtype=\'<U649\'))']
['(array([list([\'The Unsettling Immobility Of Jack Crawford\'])], dtype=object), array(["All of Crawford’s skills in forensics and in profilage basé sur l\'analyse de l\'esprit seem to be locked down in three manuscripts, always reread and reevaluated: the Bible of facts, the Bible of clues and the Bible of their art, revealing first and foremost the distinct industry of his instincts, of the solutions he adopted and their effects. But these Bibles must be constantly interpreted, eliminating the untruths or accidental mistakes. Because nothing connects in this case. Just like a scholar of the art, he must gather, classify, mix, and distill the isolated elements, thus practicing some sort of chemistry of solutions and combinations."],\n dtype=\'<U649\'))']
['(array([list([\'Test your ability to practice an opening towards new self-knowledge horizons, so that your evolution won’t be placed under the auspices of a somber ending.\', \'Leadership: Can you increase the impact between what you expect to provide to your reality and what is offered to you integrated into the struggle with yourself in terms of experiencing an extended state of consciousness?\', \'Leadership: Do you allow your functioning system to go in "Standby" mode on the line of the supreme power of discernment to see the transience of the world and human futility through a single dominant subject?\'])],\n dtype=object), array([\'When Buffalo Bill strikes in the middle of the night, everything shakes in Crawford. He seems to be touched by a red iron, feeling a shiver through his whole body. The news falls like an axe above his head. The words of general Alexander Suvorov seem to pound in his mine: "I don’t know any other way of recognizing the enemy, except going to him and beating him up ! "But where is the enemy hiding? Who is he, actually?\'],\n dtype=\'<U649\'))']
["(array([list(['The Unsettling Immobility Of Jack Crawford', '* Note:'])],\n dtype=object), array(['Experiencing an extended state of consciousness means experiencing the events directly as if you were the one triggering them and suffering from them. The only thing that makes you wonder “where all the problems and troubles come from” is the impact of reality on your mind that can create the impression of madness.'],\n dtype='<U649'))"]
['(array([], dtype=object), array([\'In the confusing game of searching, Crawford is taken over by an unstoppable panic, as if he would be waiting terrified for a cataclysm. He seems to be caught in the jaws of the burdensome approaches of psychological aspects. Only by connecting in parallel more high precision "resistors" on the circuit between promptitude, severity and pragmatism, he can would be able to point his investigation in the right direction. And reach some relevant conclusions.\'],\n dtype=\'<U649\'))']
["(array([], dtype=object), array(['Devastating ! In the subterraneans of his mind there are changes of the stimuli concentration which no longer ensure the dosage of ideas for solving the case. The nucleus of his internal functioning system can no longer use new resources. All the necessary information for regulating functionality seems to degenerate. His capacities are gathered in an autonomous region, losing their vitality. Confronted with the confusing vitality, he’d prefer an admission of clear facts, trying to think independently, to be responsible and to trust his own strength.'],\n dtype='<U649'))"]
['(array([], dtype=object), array([\'But he can’t fulfill this imperfect road of research. And then, the fight takes place inside of him. There is a rupture between two ways of „being"which can’t be so easily repaired. A hollow in the wall of science. A discrepancy between two distinct manners to approach psychology and human personality. Confused, Crawford seems to enter an uncontrollable spiral of the capacity to shed light and rebuild his own efficiency resources, needed in order to support the application of his experience.\'],\n dtype=\'<U649\'))']
["(array([], dtype=object), array(['Jack Crawford’s consciousness manifests against the backdrop of trying to discern between the nefarious discernment of his research and the impact of a leaked message from reality that he is experiencing intensely: “You can’t be certain of what you find out ! ”'],\n dtype='<U649'))"]
["(array([], dtype=object), array(['The dominant subject testing and almost overwhelming him is not catching Buffalo Bill, but escaping from the darkness of the human mind that he experiences as an existential blockade.'],\n dtype='<U649'))"]下面列出了我用来做的代码:
all_content=['contains the data in the list above in the question']
Split = np.array_split(all_content, 10)通过这段代码,列表被分成10个部分的数组,但我想要一个列表而不是数组,我想要一个没有无用单词“如data_type和数组”等的纯列表。
发布于 2021-05-27 22:46:59
为了只获取文本,请尝试以下代码:
input_data = [['(array([list([\'The Unsettling Immobility Of Jack Crawford | Neculai Fantanaru (en)\'])],\n dtype=object), array([\'The storm of exasperation unleashes with an unstoppable force over Jack Crawford, leader of the "Behavioral Science Unit"within the FBI. An inner shake is followed by the formidable noise of the friction between elements and the energy gathered in the only stage of the fight against negative thoughts. They’re there because of the inability to cope with the tricky case of "Buffalo Bill." This unseen, unknown criminal is looking for new victims. And all the blame is put on the shoulders of the person leading the investigation.\'],\n dtype=\'<U649\'))'],
['(array([list(["Test your ability to practice an opening towards new self-knowledge horizons, so that your evolution won\'t be placed under the auspices of a somber ending."])],\n dtype=object), array([\'The whole evolution and performance of Jack Crawford seems to be placed under the auspices of a somber ending. Is he still the qualified person for this mission to identify the sick human type who brings disadvantages to society? Can he still reach in the unreachable and set the oscillations of manifestations and behavioral formulae for the murderous ghost who shamelessly haunts, with its intrigues, with its uncommon force, every single place?\'],\n dtype=\'<U649\'))'],
['(array([list([\'The Unsettling Immobility Of Jack Crawford\'])], dtype=object), array(["All of Crawford’s skills in forensics and in profilage basé sur l\'analyse de l\'esprit seem to be locked down in three manuscripts, always reread and reevaluated: the Bible of facts, the Bible of clues and the Bible of their art, revealing first and foremost the distinct industry of his instincts, of the solutions he adopted and their effects. But these Bibles must be constantly interpreted, eliminating the untruths or accidental mistakes. Because nothing connects in this case. Just like a scholar of the art, he must gather, classify, mix, and distill the isolated elements, thus practicing some sort of chemistry of solutions and combinations."],\n dtype=\'<U649\'))'],
['(array([list([\'Test your ability to practice an opening towards new self-knowledge horizons, so that your evolution won’t be placed under the auspices of a somber ending.\', \'Leadership: Can you increase the impact between what you expect to provide to your reality and what is offered to you integrated into the struggle with yourself in terms of experiencing an extended state of consciousness?\', \'Leadership: Do you allow your functioning system to go in "Standby" mode on the line of the supreme power of discernment to see the transience of the world and human futility through a single dominant subject?\'])],\n dtype=object), array([\'When Buffalo Bill strikes in the middle of the night, everything shakes in Crawford. He seems to be touched by a red iron, feeling a shiver through his whole body. The news falls like an axe above his head. The words of general Alexander Suvorov seem to pound in his mine: "I don’t know any other way of recognizing the enemy, except going to him and beating him up ! "But where is the enemy hiding? Who is he, actually?\'],\n dtype=\'<U649\'))'],
["(array([list(['The Unsettling Immobility Of Jack Crawford', '* Note:'])],\n dtype=object), array(['Experiencing an extended state of consciousness means experiencing the events directly as if you were the one triggering them and suffering from them. The only thing that makes you wonder “where all the problems and troubles come from” is the impact of reality on your mind that can create the impression of madness.'],\n dtype='<U649'))"],
['(array([], dtype=object), array([\'In the confusing game of searching, Crawford is taken over by an unstoppable panic, as if he would be waiting terrified for a cataclysm. He seems to be caught in the jaws of the burdensome approaches of psychological aspects. Only by connecting in parallel more high precision "resistors" on the circuit between promptitude, severity and pragmatism, he can would be able to point his investigation in the right direction. And reach some relevant conclusions.\'],\n dtype=\'<U649\'))'],
["(array([], dtype=object), array(['Devastating ! In the subterraneans of his mind there are changes of the stimuli concentration which no longer ensure the dosage of ideas for solving the case. The nucleus of his internal functioning system can no longer use new resources. All the necessary information for regulating functionality seems to degenerate. His capacities are gathered in an autonomous region, losing their vitality. Confronted with the confusing vitality, he’d prefer an admission of clear facts, trying to think independently, to be responsible and to trust his own strength.'],\n dtype='<U649'))"],
['(array([], dtype=object), array([\'But he can’t fulfill this imperfect road of research. And then, the fight takes place inside of him. There is a rupture between two ways of „being"which can’t be so easily repaired. A hollow in the wall of science. A discrepancy between two distinct manners to approach psychology and human personality. Confused, Crawford seems to enter an uncontrollable spiral of the capacity to shed light and rebuild his own efficiency resources, needed in order to support the application of his experience.\'],\n dtype=\'<U649\'))'],
["(array([], dtype=object), array(['Jack Crawford’s consciousness manifests against the backdrop of trying to discern between the nefarious discernment of his research and the impact of a leaked message from reality that he is experiencing intensely: “You can’t be certain of what you find out ! ”'],\n dtype='<U649'))"],
["(array([], dtype=object), array(['The dominant subject testing and almost overwhelming him is not catching Buffalo Bill, but escaping from the darkness of the human mind that he experiences as an existential blockade.'],\n dtype='<U649'))"]]
pure_text = []
for item in input_data:
item = item[0].replace('"',"'")
pure_text.append(item.split("[")[2].split("'")[1])在数据中使用了不同的反逗号,因此将“替换为‘”以确保一致性。
然后,我们先用[拆分每一项,然后用‘拆分,得到纯文本,它保存在pure_text列表中。
https://stackoverflow.com/questions/67724117
复制相似问题