Python, product from itertools, and asterisk. I need your help to understand!
# regarding the command, product, and lists, I noticed something that I need help to understand. from itertools import product astr = "SoloLearn Learning LearningIsFun Learnable" alist = astr.split() for i in product(alist): print(i) for i in product(*alist): print(i) """ except asterisk, ('SoloLearn',) ('Learning',) ('LearningIsFun',) ('Learnable',), it just shows each element of list. However, with asterisk, it presents ...('n', 'i', 'I', 'r') ('n', 'i', 'I', 'n') ('n', 'i', 'I', 'a' )('n', 'i', 'I', 'b') ('n', 'i', 'I', 'l') ('n', 'i', 'I', 'e') ('n', 'i', 's', 'L') ('n', 'i', 's', 'e')... basically products of each character of each element attached to other characters from other elements in the list. And I want to know why it differs with such a small difference, which is just " * ". Thanks in advance and I do appreciate your effort to resolve my curiosity!