Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Unpacking a dict with * or **
Post: RE: Unpacking a dict with * or **

(Nov-30-2023, 02:51 PM)Gribouillis Wrote: *x is not a valid Python expression, it cannot be evaluated. What would its value be? On the other hand func(*x) is a valid expression. There is no unary op...
msrk General Coding Help 4 1,028 Dec-02-2023, 11:50 PM
    Thread: Unpacking a dict with * or **
Post: Unpacking a dict with * or **

I can unpack a dict with the ** operator. But something strange happens if I try to unpack it with *. This may be obvious given that the * operator unpacks a tuple or list. But watch this: x = {'a...
msrk General Coding Help 4 1,028 Nov-30-2023, 02:40 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020