How To Write Queue In Python