i and step represent the same variable returned by enumerate (the counter of the current loop).
The return value of the dataloader seems to be a dict in the first example, so batch will contain the keys 'A' and 'B', while data_loader will return a tuple which is unpacked to x and y.