Use zip
:
>>> ["{}{:02}".format(b_, a_) for a_, b_ in zip(a, b)]
['asp100', 'asp101', 'asp105', 'asp106', 'asp210', 'asp211']
More Related Contents:
- How to iterate through two lists in parallel?
- Transpose/Unzip Function (inverse of zip)?
- Are lists thread-safe?
- Python List vs. Array – when to use?
- How can I iterate through two lists in parallel?
- Getting a list of values from a list of dicts
- Pairs from single list
- Splitting a list based on a delimiter word
- What is the most pythonic way to pop a random element from a list?
- Naming conflict with built-in function
- How do I split a list into equally-sized chunks?
- How can I make a dictionary from separate lists of keys and values?
- What is the time complexity of popping elements from list in Python?
- How can I generate a list of consecutive numbers?
- Accessing a value in a tuple that is in a list
- Check if value already exists within list of dictionaries?
- Convert list into a dictionary [duplicate]
- How to save a list to a file and read it as a list type?
- Python passing list as argument
- Python: get a dict from a list based on something inside the dict
- Creating an empty list in Python
- Python: Remove Duplicate Items from Nested list
- Changing one dict changes all dicts in a list of dicts [duplicate]
- Python string.join(list) on object array rather than string array
- How to sort multidimensional array by column?
- sum each value in a list of tuples
- Python and SQLite: insert into table
- How to create a number of empty nested lists in python [duplicate]
- How can I sort a list, according to where its elements appear in another list?
- How can I turn a flat list into a 2D array in python?