程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了为什么我没有足够的值来解压(预期为 3,得到 1)复杂的列表理解大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决为什么我没有足够的值来解压(预期为 3,得到 1)复杂的列表理解?

开发过程中遇到为什么我没有足够的值来解压(预期为 3,得到 1)复杂的列表理解的问题如何解决?下面主要结合日常开发的经验,给出你关于为什么我没有足够的值来解压(预期为 3,得到 1)复杂的列表理解的解决方法建议,希望对你解决为什么我没有足够的值来解压(预期为 3,得到 1)复杂的列表理解有所启发或帮助;

我正在努力理解列表,但我不知道如何处理。我想我明白这个问题,但我想保留我的一个班轮。
extract_entitIEs(content) 返回 3 个元素的元组列表

[result_file_ner.write(convert_format(f'{name}\t{tag}\t{ner}\n',pos_tablE)) 
 for name,tag,ner in zip(*[iter(extract_entitIEs(content))])]

如何更改此列表理解以保持单行? 事实上,我必须这样做才能工作,但我不确定这是否是一个好方法

List(map(lambda x: print(X),zip(*[iter(extract_entitIEs(content))]))) 

给予

([('Consuela','NNP','B-PERSON'),('Washington','B-ORGANIZATION'),(',','O'),('a','DT',('longtime','JJ',('House',('staffer','NN',('and','CC',('an',('expert',('in','IN',('securitIEs','NNS',('laws',('is','VBZ',('leading','VBG',('candIDate',('to','TO',('be','VB',('chairwoman',('of',('the',('SecuritIEs','NNPS',('Exchange',('Commission','I-ORGANIZATION'),('Clinton',('administration',('.','.','O')],)
([('Ms.','B-GPE'),('44','CD',('years',('old',('would','MD',('first',('woman',('black',('head',('five-member',('commission',('that','WDT',('oversees',('markets',("'s",'POS',('candIDacy',('being',('championed','VBN',('by',('several',('powerful',('lawmakers',('including',('her','PRP$',('boss',('ChaiRMAN',('John',('Dingell','I-PERSON'),('(','(',('D.',('Mich.',(')',')',('Energy',('Commerce',('Committee',)
([('She','PRP',('currently','RB',('counsel',('committee',('Mr.',('have','VBP',('been',('consIDered',('allIEs',('exchanges',('while',('banks',('futures',('often',('fought',('with',('them',)
([('A',('graduate',('Harvard',('Law',('School',('Ms.',('worked','VBD',('as',('laywer',('for',('corporate',('finance',('division',('SEC',('late',('1970s',('has',('congressional',('since',('1979',)
([('Separately',('Transition',('officials',('saID',('Frank',('Newman',('50',('vice',('chaiRMAN',('chIEf',('financial',('officer',('BankAmerica',('Corp.',('expected',('nominated',('assistant',('Treasury',('secretary',('domestic',)
([('Mr.',('who','WP',('giving',('up','RP',('job',('pays',('$','$',('1',('million',('year',('oversee',('auctions',('government',('well',('banking',('issues',)
([('He',('report',('directly',('Secretary-designate',('Lloyd',('Bentsen',('headed',('Senate',('Finance',('past',('six',('also',('nominate',('Samuel',('Sessions',('tax',('one',('top',('jobs',('at',)
([('As',('early',('today',('camp',('name',('five',('undersecretarIEs',('state',('secretarIEs',)
([('Peter',('Tarnoff',('former',('Carter',('official',('presIDent',('Council',('on',('Foreign',('Relations',('named',('undersecretary',('political',('affairs',)
([('Former',('Sen.',('Tim',('Wirth',('get',('newly',('created',('post',('global',('which',('include',('refugees',('drugs',('environmental',)
([('EarlIEr','RBR',('colorado',('Democrat',('had',('contender',('Environmental',('Protection',('Agency',)
([('In',('addition',('Joan',('Spero',('executive',('American',('Express',('Co.',('economic',)
([('And',('Time',('magazine',('columnist',('Strobe',('Talbott',('ambassador-at-large',('coordinate',('U.s.',('policy',('toWARD',('SovIEt',('Union','I-GPE'),)
([('Several',('appointees',('PresIDent',('Bush',('are',('likely',('stay',('office',('least','JJs',('temporarily',('until',('peRMANent',('successors',('can',)
([('One',('Bernadine',('Healy',('director',('National',('Institutes',('Health',)
([('Another',('holdover',('DavID',('Kessler',('Food',('Drug',('administration',('offfice',('Trade',('Representative-designate',('Mickey',('Kantor',('SELEctions',('three',('deputy',('Trade',('representative',('slots',('general',('still',('decIDed',)
([('But',('Robert',('Kyle',('or',('elsewhere',)
([('For',('many',('subcabinet',('List',('candIDates',('narrowed',('consIDerably',)
([('Clinton',('decIDing',('between',('recently',('retired',('Rep.',('Matthew',('McHugh',('N.Y.',('activist',('Gus',('Speth',('International',('Development',)
([('Among',('others',('hired',('Kitty',('Higgins',('aIDe',('Michigan',('Sander',('Levin',('staff',('Labor',('Department',('jerry',('Palast',('service',('employees',('department',('legislative',('incoming',('serIoUsly',('consIDering',('moving',('brIEfing',('room',('press',('decades',('situated',('West','B-LOCATION'),('Wing','I-LOCATION'),('White','B-FACIliTY'),'I-FACIliTY'),('out',('into',('old',('Executive',('Office',('Building',('next',('door',)
([('The',('current',('Could',('used',('offices',)
[[result_file_ner.write(convert_format(f'{name}\t{tag}\t{ner}\n',pos_tablE)) 
  for name,ner in line]
 for line in extract_entitIEs(content)]

如何访问?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的为什么我没有足够的值来解压(预期为 3,得到 1)复杂的列表理解全部内容,希望文章能够帮你解决为什么我没有足够的值来解压(预期为 3,得到 1)复杂的列表理解所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。