title: Algorithm or performance improvement for below code
body: <p>I wrote the below program for one of the questions asked in the interview preparation websites. I would like to know if this code efficient or not or how can we improve if it is not efficient?</p>
  
  <p>My problem</p>
  
  <p>Write a function that takes an integer flight_length (in minutes) and a list of integers movie_lengths (in minutes) and returns a boolean indicating whether there are two numbers in movie_lengths whose sum equals flight_length.</p>
  
  <p>When building your function:</p>
  
  <p>Assume your users will watch exactly two movies
  Don't make your users watch the same movie twice
  Optimize for runtime over memory </p>
  
  <pre><code>def movie_length(fligh_length,movietimes):
    newmovietimes =[]
    for time in movietimes[0::]:
      if time not in newmovietimes:
        newmovietimes.append(time)
      else:
        print("movie times are equal")
    if fligh_length == sum(newmovietimes):
      return print("you can watch")
    else:
      return 
  
  print("you can't watch")
  
  
  movie_length(11,[8,2])
  </code></pre>