I know there is are easier ways to assign multiple objects to a variable,
but why, does the following code work?  Why does it return a tuple versus a
list?  I know it has something to do with the semi-colon, but I didn't know
it wouldn't  raise an error.

greetings = "hello,", "what's", "your", "name?"
print(greetings)

x = 1, 2, 3, 4, 5, 6, 7
print(x)

I assumed that you could only assign one object per assignment without the
presence of tuples, list, or dictionaries.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to