I was just thinking the same. There's not really any reason a shell can't have terse syntax for quick command things and explicit, careful syntax for things that require it. And if python had a pipe operator, you could basically do
open('file.txt') |> grep(?,"lasagna") |> set |> sorted
Which is really pretty good. It's not at all hard to imagine a Python that was designed to be good in the shell. They just didn't try.