Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python special methods list

a = [2,3,4,5]   # Create a list
s = repr(a)     # s = '[2, 3, 4, 5]'
                # Note : could have also used s = ´a´
b = eval(s)     # Turns s back into a list
Source by www.informit.com #
 
PREVIOUS NEXT
Tagged: #python #special #methods #list
ADD COMMENT
Topic
Name
3+2 =