char_to_ix = { ch:i for i,ch in enumerate(chars) }
creates a Dictionary called "char_to_ix" that has for its keys, each character from the list "chars". The corresponding values are numbers from 0 to len(chars)-1.
This line:
ix_to_char = { i:ch for i,ch in enumerate(chars) }
creates a Dictionary called "ix_to_char" that has the reverse key/value pairs as those of "char_to_ix". So each key of "ix_to_char" is a number from 0 to len(chars)-1 and its value is a character from the list "chars".