li=[22 , True , 22/7 , {"Staat":"Deutschland" , "Stadt" : "Berlin"} , 69
, ["Python" , "C++" , "C#"] ,
("Kairo" , "Berlin" , "Amsterdam") , False , "Apfel" , 55 ]
How can I sort this list in multiple lists , one list for each data type (int , str , dict, etc..)
for x in li:
if type(x) == float:
double = x
print("double" ,double )
elif type(x) == str:
strings = x
print("strings" ,strings)
it is too long , and its does not combine similar data in one list