Salesforce Fact #792 | Iterate over two lists in same loop

Suppose we have two lists of different length and we want to iterate over the lists in the same loop. We can do this by using some logic in apex. Attached is the sample code snippet.
This blog contains some of the Salesforce facts which I have found quite interesting. Happy learning.