Для примера петли Python 3

 for num in nums:
     for letter in 'abs':
         print(num, letter)
Silly Sheep