在python中工作时,我有时会发现我不必要地拥有一个代码片段:
thing = longfunctioncall(with, many, necessary, arguments, that, take, a, fairly, long, time, to, type)
formattedthing = [str(*q) for q in thing]
我可以合并到:
formattedthing = [str(*q) for q in longfunctioncall(with, many, necessary, arguments, that, take, a, fairly, long, time, to type)]
我知道你可以简单地杀死并猛拉整个声明,但我想知道是否有更多的EMACSy方法可以做到。