程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

How Python uses a loop to fetch information from two lists

編輯:Python

Is there any way to get the information of both lists at the same time , Be right . The suggestions are convenient and concise

matter_list = [' Leading enterprise in human resources service industry of Hubei Province ', ' Tax credit A List of first-class taxpayers ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Tax credit A List of first-class taxpayers ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Business Enterprises ']url_lsit =['/credithb/gkgs/detail.html?type=RedListEnterprise&id=6094F7FAA81F4384816C09C0E4FE7171&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=629309957CAA405C82E95F5CB31F0C7D&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=3B5CF08D913F4A3584CB04971079C852&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=58203092203749D4AF2FA290ED9DF7C9&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=49BA8E30C3944041BA861C9588542BF1&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=E39594B514F349DCAA2396B21EDCC771&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=636909CC287441C189A289A7C1AF09E9&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=F41D0C1C2D0A4995A68003A4EDEA87EE&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=80B5E13C000F46918D57574F4C734AC0&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=AA603338B0DB4539B49E12FFF17492BA&qxbm=XY410827']for url in url_list: print(url)



Take the answer :
 matter_list = [' Leading enterprise in human resources service industry of Hubei Province ', ' Tax credit A List of first-class taxpayers ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Tax credit A List of first-class taxpayers ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Leading enterprise in human resources service industry of Hubei Province ', ' Business Enterprises '] url_list = ['/credithb/gkgs/detail.html?type=RedListEnterprise&id=6094F7FAA81F4384816C09C0E4FE7171&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=629309957CAA405C82E95F5CB31F0C7D&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=3B5CF08D913F4A3584CB04971079C852&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=58203092203749D4AF2FA290ED9DF7C9&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=49BA8E30C3944041BA861C9588542BF1&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=E39594B514F349DCAA2396B21EDCC771&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=636909CC287441C189A289A7C1AF09E9&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=F41D0C1C2D0A4995A68003A4EDEA87EE&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=80B5E13C000F46918D57574F4C734AC0&qxbm=XY410827', '/credithb/gkgs/detail.html?type=RedListEnterprise&id=AA603338B0DB4539B49E12FFF17492BA&qxbm=XY410827'] for i in range(len(url_list)): print(matter_list[i]) print(url_list[i]) print("_____________________________________")

Try this.



  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved