In code, list.clear doesn't throw error - it's just ignored

Chris Angelico rosuav at gmail.com
Tue Nov 15 18:15:32 EST 2022


On Wed, 16 Nov 2022 at 10:11, <avi.e.gross at gmail.com> wrote:
>
> That is clear, Cameron, but on my python interpreter values evaluated on the
> command line ARE saved:
>
> >>> numb = 5
> >>> 5 + numb
> 10
> >>> numb
> 5
> >>> _ + _ + 1
> 11

That's a REPL feature.

ChrisA


More information about the Python-list mailing list