If you get rid of that elif hopefully this will all fit on one line. If it doesn't, you should use brackets instead of escaping the newline.