0x03-python-data_structures/100-print_python_list_info.c
/**
 * print_python_list_info - prints some basic info about Python lists.
 * @p: PyObject List
 */
prints some basic info about Python lists.
prints some basic info about Python lists .
void print_python_list_info(PyObject *p)
{
	int size = PyList_Size(p);
	PyListObject *pyobj = (PyListObject *)p;
	int i = 0;
	printf("[*] Size of the Python List = %d\n", size);
	printf("[*] Allocated = %li\n", pyobj->allocated);
	for (i = 0; i < size; i++)
	{
		printf("Element %d: %s\n", i, Py_TYPE(pyobj->ob_item[i])->tp_name);
	}
}
void print_python_list_info ( PyObject * p ) { int size = PyList_Size ( p ) ; PyListObject * pyobj = ( PyListObject * ) p ; int i = 0 ; printf ( " \n " , size ) ; printf ( " \n " , pyobj -> allocated ) ; for ( i = 0 ; i < size ; i ++ ) { printf ( " \n " , i , Py_TYPE ( pyobj -> ob_item [ i ] ) -> tp_name ) ; } }
print_python_list_info - prints some basic info about Python lists.
print_python_list_info - prints some basic info about Python lists .