I was writing a function to find the number of unique words from input.
At a moment when i was bored and try to do nothing to kill time, I wished to print all words that was passed to the function via *arg.
It is known that *args was a tuple, so the code
print(arg)
was supposed to out put "('babe', 'I', 'love', 'you')" or "('babe', 'I', 'love', 'you', 'do', 'you', 'love', 'me')", and I knew that.
However, there is a typo in my code, a unexpected "*". So the code is actually:
print(*arg)
why it work, why didn't it raise an exception? None of Google , Baidu nor Bing had the answer.