Skip to content

Instantly share code, notes, and snippets.

@krazylearner
Created June 12, 2015 14:41
Show Gist options
  • Select an option

  • Save krazylearner/dfc8bf5ce77d0aad41b3 to your computer and use it in GitHub Desktop.

Select an option

Save krazylearner/dfc8bf5ce77d0aad41b3 to your computer and use it in GitHub Desktop.
Python List list() Method
The method list() takes sequence types and converts them to lists. This is used to convert a given tuple into list.
aTuple = (123, 'xyz', 'zara', 'abc');
aList = list(aTuple)
print "List elements : ", aList
#When we run above program, it produces following result:
List elements : [123, 'xyz', 'zara', 'abc']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment