https://github.com/NikVard/memstim-hh
Tip revision: 51992fc0bf834e9bb5e3f6f31131384a9d16e476 authored by NikVard on 06 March 2023, 14:24:08 UTC
[FIX] Updated instructions
[FIX] Updated instructions
Tip revision: 51992fc
annex_funcs.py
# -------------------------------------------
# Miscellaneous helper functions
# -------------------------------------------
def make_flat(old_list):
''' Takes as argument a list of lists and flattens it (i.e. returns a 1D list with all the elements) '''
new_list = []
for elem in old_list :
if type(elem)==list:
elem_flat = make_flat(elem)
new_list += elem_flat
else :
new_list.append(elem)
return new_list
