Write a python program that will take N as input from the user and then take N number of inputs from the user and store the input in a dictionary where the key will be the data type of that input and...


Write a python program that will take N as input from the user and then
take N number of inputs from the user and store the input in a dictionary
where the key will be the data type of that input and the value will be a
list of that corresponding data type. If any data type is missing in the
input then do not add that corresponding data type as key of the
dictionary. Finally print that dictionary Assume all the inputs will be
String, Integer and Float.



Sample Input 1:
5
1
1.2
3
hello
hi



Sample Output 1:
{'Integer': [1, 3], 'Float': [1.2], 'String': ['hello', 'hi']}




Sample Input 2:
3
naruto
tanjiro
7



Sample Output 2:
{'String': ['naruto', 'tanjiro'], 'Integer': [7]}



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here