guxiaobei
  • 存主机ip到列表

  • host_list=[]
    netip=\'192.168.1\'
    for hostip in range(1,254):
        ip = netip +str(hostip)
        host_list.append(ip)
    hostlist

     

  • 列表遍历

  • shoplist = [apple,mango]
    for index,value in enumerate(shoplist):
        print index,value
    
    结果 0  apple
            1 mango

     

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-12-25
  • 2022-01-03
  • 2022-01-17
  • 2021-10-01
  • 2021-08-08
  • 2022-02-05
  • 2021-08-30
猜你喜欢
  • 2021-06-05
  • 2021-06-12
  • 2021-06-18
  • 2021-07-26
  • 2022-01-01
  • 2022-12-23
相关资源
相似解决方案