What is the equivalent of php's print_r() in python? -


Or there is a better way to quickly output content of an array (multidimensional or not). Thank you.

Python statement does a good job of formatting multidimesion arrays without the need to be available in php.

According to the definition of print, each object is converted into a string, and printed as' simple 'by' '' by '' 'object values' by comma-linked list It will work for it, no depth and size of arrays.

For example

  & gt; & Gt; & Gt; X = [[1,2,3], [4,5,6]] gt; & Gt; & Gt; Print X [[1, 2, 3], [4, 5, 6]]  

If you need more advanced formatting than this, probably the answer to that probably might be the answer is.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -