Longest Substring Without Repeating Characters

Tried solving Longest Substring Without Repeating Characters problem in python. It looked simple at first, but it required some logic.