When you assign multiple values separated by a comma, that's a tuple. In your code, where you have int(l1), int(l2), int(l3), ... etc, you're creating a tuple.
oh? i tot by doing so is just cast the data type from str to int?
yes... but for my example may i know how come it returns me the values in tuple?
What I meant was those commas when assigning a value, python reads that as if you're trying to make a tuple. You don't always need the parenthesis to make a tuple, you just need at least one comma
noted... thank you
Обсуждают сегодня