Why print unpacked list of number return a sequence of number in the same line

Huang, I see you used ' * ' here and in your other topic and you got unexpected results both times. ' * ' is used to feed the members of a group data object one by one instead of as a single group object. It is normally used inside of a def(): function block to feed argument values to the function. Python is amazingly flexible and is happy to let you use it in a print() function. However, you should probably not use ' * ' before learning more basic Python and FULLY understand WHEN to use ' * '.

Rob came close to explaining but maybe his answer was lost in the other detail.

“Iterate” means ‘to repeat an action’. In Python the action is ‘feed group members one at a time’.   * is an iterator instruction.

Did you run Rob’s print(*'Hello') example?

1 Like