my python script is:
bam_files_list = [file for file in os.listdir(bam_file_path) if file.endswith(".bam")]
subprocess.call([".merge_and_remove_dup.sh", bam_files_list, sample_name],shell=False)
Then the bash command. So you say I need to convert the list to sequence of strings (names of the files)?
I don't see python code in your example.