从列表Python中删除略微重复的项目

时间:2016-11-16 23:07:27

标签: python python-3.x

我有一份清单。这是随机的。我想在重复时删除列表中的项目。

我只希望列表中的这些网址(项目)。

/watch?v=iOpJywrdCuQ&lc=z13ohzibgwq3yjw4u04cglzhxmioy5phrn00k

我只会从列表中删除这些网址(项目)。

/watch?v=iOpJywrdCuQ&lc=z13ohzibgwq3yjw4u04cglzhxmioy5phrn00k.1479303517063659

urlList是保存所有内容的变量。

/watch?v=iOpJywrdCuQ&lc=z12ntbeg5nvptj2pv04chz5roqfpyxpp1to0k
/watch?v=iOpJywrdCuQ&lc=z13ohzibgwq3yjw4u04cglzhxmioy5phrn00k
/watch?v=iOpJywrdCuQ&lc=z13ohzibgwq3yjw4u04cglzhxmioy5phrn00k.1479303517063659
/watch?v=iOpJywrdCuQ&lc=z12zt3fagtymh3nta23dhpsohmjocfwqd04
/watch?v=iOpJywrdCuQ&lc=z12mv3rgatfcf3jvq22tuzgzcmfadbtvi
/watch?v=iOpJywrdCuQ&lc=z13ohrfy3mb5xphyh04cd3shfq2bzhr5up00k
/watch?v=iOpJywrdCuQ&lc=z13ohrfy3mb5xphyh04cd3shfq2bzhr5up00k.1475086029972480
/watch?v=iOpJywrdCuQ&lc=z13ohrfy3mb5xphyh04cd3shfq2bzhr5up00k.1475086070389366
/watch?v=iOpJywrdCuQ&lc=z13qulw4jvafgxo1322hdfnitwv5u35d0
/watch?v=iOpJywrdCuQ&lc=z13qulw4jvafgxo1322hdfnitwv5u35d0.1478197028336117
/watch?v=iOpJywrdCuQ&lc=z12xxv3r3py3jv5en23vjft4gxb3jhnkx
/watch?v=iOpJywrdCuQ&lc=z12xxv3r3py3jv5en23vjft4gxb3jhnkx.1478703511076217
/watch?v=iOpJywrdCuQ&lc=z12fzxwqwlr4xdkao04cflhbawivd1gq2jc
/watch?v=iOpJywrdCuQ&lc=z12oczcbksudef3cq23psfd4cqjycro5e04
/watch?v=iOpJywrdCuQ&lc=z12oczcbksudef3cq23psfd4cqjycro5e04.1478790261949273
/watch?v=iOpJywrdCuQ&lc=z135h1sxqprthvfdl23hsh2qdrmggpzsc

我想要的是什么:

/watch?v=iOpJywrdCuQ&lc=z12ntbeg5nvptj2pv04chz5roqfpyxpp1to0k
/watch?v=iOpJywrdCuQ&lc=z13ohzibgwq3yjw4u04cglzhxmioy5phrn00k
/watch?v=iOpJywrdCuQ&lc=z12zt3fagtymh3nta23dhpsohmjocfwqd04
/watch?v=iOpJywrdCuQ&lc=z12mv3rgatfcf3jvq22tuzgzcmfadbtvi
/watch?v=iOpJywrdCuQ&lc=z13ohrfy3mb5xphyh04cd3shfq2bzhr5up00k
/watch?v=iOpJywrdCuQ&lc=z13qulw4jvafgxo1322hdfnitwv5u35d0
/watch?v=iOpJywrdCuQ&lc=z12xxv3r3py3jv5en23vjft4gxb3jhnkx
/watch?v=iOpJywrdCuQ&lc=z12fzxwqwlr4xdkao04cflhbawivd1gq2jc
/watch?v=iOpJywrdCuQ&lc=z12oczcbksudef3cq23psfd4cqjycro5e04
/watch?v=iOpJywrdCuQ&lc=z135h1sxqprthvfdl23hsh2qdrmggpzsc

我该怎么做?

1 个答案:

答案 0 :(得分:0)

测试匹配的字符block in spawn_rack_application' 19 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb 82 in的正则表达式(由synchronize' 21 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb 79 in表示,因为spawn_rack_application' 23 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb 137 in保留给handle_spawn_application' 25 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb 357 in):

start_synchronously'
27  /etc/httpd/modules/passenger/helper-scripts/passenger-spawn-server  99  in