No, it's not possible (at least not with arbitrary statements), nor is it desirable. Fitting everything on one line would most likely violate PEP-8 where it ... ... <看更多>
What is the purpose of an if/else statement? It tells the computer which chunk of code to run if the instructions you coded are incorrect. It runs one chunk of ... ... <看更多>