In Python i am creating a classmethod and i am using a classmethod to get my parameters from a string by spliting it i am getting what i want but cannot understand why i get a list when i am not using * and not getting list when using *. here's my code below.
@classmethod
def from_one_str(cls, onestr):
print(*onestr.split(",")) # getting two string
# on running this is result - John C++
print(onestr.split(",")) # getting a list of two strings
# on running this is result - ['John', 'C++']
# This is what i am running - John = Programmer.from_one_str("John,C++")