Answers for "return object in python"

0

return object in python

# This function returns a dictionary
def foo():
     d = dict();
     d['str'] = "Tutorialspoint"
     d['x']   = 50
     return d
print foo()

#Output
#'x': 50, 'str': 'Tutorialspoint'}
Posted by: Guest on June-17-2021

Code answers related to "return object in python"

Python Answers by Framework

Browse Popular Code Answers by Language