Today I by mistake inputted just a comma on an interactive session
Input:
,
and I noticed strangely that it did not return an error but instead:
Output
''
So I explored a bit this behaviour and tried some random stuff, and it seems like it creates tuples of strings, but it seems like these objects cannot be interacted with:
, 'foo' bar 1 x
returns:
("'foo'", 'bar', '1', 'x')
Trying to assign those tuples or making some == checks doesn't really work but return errors.
I couldn't find any answer or documentation about this behaviour. Anyone know what's happening here?
EDIT: I am using Python 3.9.8 and running in VSCode interactive window with IPython. As someone pointed out in the comments this is not the behaviour when running from the terminal

