0

What happens here ?

s = 'Hello' print (*s) and the out put is H e l l o

8th Nov 2019, 11:40 AM
ayan sinha
ayan sinha - avatar
2 Antworten
+ 4
search for "unpack operator"
8th Nov 2019, 11:47 AM
Bilbo Baggins
Bilbo Baggins - avatar
+ 3
`*` is to unpack a list, and `**` is to unpack a dictionary. You can consider `string` as a `char` list.
8th Nov 2019, 1:02 PM
o.gak
o.gak - avatar