rename variable to obtain a code easir to read
In this code :
with open(args.table) as fp: for cluster in fp: # If we are not at the end of file # we store intermediate cluster id of the reading line in "key" variable # and global cluster id in "value" variable of the dictionnary. glob_cluster, *int_cluster = cluster.split() for c in int_cluster : dict_cltr_global_cltr[c]=glob_cluster # Initialization of dict_cltr_count keys with the name of keys of dict (name of clusters). # Initialization of dict_cltr_count values at 0. dict_cltr_count[glob_cluster] = *len(files_of_counts)
I think it will be better to rename variables and remove comments if the code is enough explicit by itself.
For example : with open(args.table) as fp: for cluster in fp: global_cluster, *intermediate_clusters = cluster.split() for int_cluster in intermediate_clusters : dict_cltr_global_cltr[int_cluster] = global_cluster # Initialization of dict_cltr_count values at 0. dict_cltr_count[global_cluster] = *len(files_of_counts)
When you do that you don't need to change the comment when your code evolves because the code itself is explicit.