A very useful feature many people overlook is the ability to construct a Map using a SOQL query.
Map<Id, Account> accounts = new Map<Id, Account>([SELECT Id, Name FROM Account]);
System.debug(accounts);
When you run this code, accounts then contains a Map of your Account objects, ke...