DEV Community

loading...

Discussion on: Vim practical example

Collapse
indrora profile image
Morgan Gangwere 🔹

A cleaner way:

import itertools

langs=('en','de','jp','fr')
nums=(1,2,3,4,5,6)

urls = map( lambda k: "http://provider.lol/some-path/{0}#lang/{1}".format(*k),
   itertools.product(nums,langs) )