两个txt文件里存着不同数量的推文数据,每一行开头的一串数字是该条推文的ID,ID和推文内容用“:”冒号隔开,根据ID比较两个txt文件中推文,再分别列出连个txt文件中共有的推文,第一个文件独有的,和第二个文件独有的推文。
txt文件如下。求份详细点的代码。
1.txt
232204745903841280:RT @ZOO: Amazing - a runner falls over in the women''s 400m hurdles, but look at her surname. You couldn''t write it #London2012 http://t. ...
232204745455046658:RT @mrianleslie: Why is that our Olympic athletes are so impressive and likeable in interviews and our footballers so dull, dim and char ...
232204746340044800:They should have Olympic breaks to give you a chance to run to the fridge to get the beer !
232204746574946306:He nearly got knocked out and took the fight hahaha #nevin #London2012
2.txt
232204746340044800:They should have Olympic breaks to give you a chance to run to the fridge to get the beer !
232204746574946306:He nearly got knocked out and took the fight hahaha #nevin #London2012
232204745958371328:RT @ZOO: Amazing - a runner falls over in the women''s 400m hurdles, but look at her surname. You couldn''t write it #London2012 http://t. ...
232204746281320449:RT @mikelgustafson: Katie Ledecky cannot: drive, vote, drink, smoke, gamble, buy a handgun, or attend "Magic MIke"... but she can become ...
232204746830786560:Marik que nervios Katerin Ibarguen!!.. @London2012
怎样改代码可以在打印结果里分别显示共同报文、1独有报文和2独有报文呢?现在的是区分出报文后分一条写一条,三种报文混在一起的。如图。