Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 16 Online
OpenStudy (anonymous):

how do you "expect" a touple in a function? is it just def function(tuple) ? or do i need some type of conversion there ?

OpenStudy (anonymous):

You don't have to do anything to 'expect' a particular type of variable in python. Just define your function normally: def myfunction(something): And use something as though it's a tuple..

OpenStudy (carlsmith):

You just write the function so it will operate on a tuple. You can make the function insist on a tuple, but you'd normally just write your function on the assumption it'll always be passed a tuple and then only ever pass it one.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!