Mar-21-2020, 05:07 PM
What should I do to make it look like this?
String Methods List Methods Tuple Methods Dict Methods Set Methods
title() append() ...... .... .......
replace() extend() ...... ....... ........
...... ....
String Methods List Methods Tuple Methods Dict Methods Set Methods
title() append() ...... .... .......
replace() extend() ...... ....... ........
...... ....
str_ = "String Methods" list_ = "List Methods" tuple_ = "Tuple Methods" dict_ = "Dict Methods" set_ = "Set Methods" print(f"{str_:<20} {list_:<20} {tuple_:<20} {dict_:<20} {set_:<20}") print() str_list = list() list_list = list() tuple_list = list() dict_list = list() set_list = list() for i in dir(""): if not i.startswith("__"): str_list += [i] for i in dir([]): if not i.startswith("__"): list_list += [i] for i in dir(tuple()): if not i.startswith("__"): tuple_list += [i] for i in dir(dict()): if not i.startswith("__"): dict_list += [i] for i in dir(set()): if not i.startswith("__"): set_list += [i] total_list = [] total_list += [str_list, list_list, tuple_list, dict_list, set_list] #for i in total_list: # print(*i)