diff --git a/canvasapi/util.py b/canvasapi/util.py
index 0431db8..5ee291e 100644
--- a/canvasapi/util.py
+++ b/canvasapi/util.py
@@ -89,8 +89,8 @@ def flatten_kwarg(key, obj):
         # Add empty brackets (i.e. "[]")
         new_list = []
         for i in obj:
-            for tup in flatten_kwarg(key, i):
-                new_list.append((tup[0] + '[]', tup[1]))
+            for tup in flatten_kwarg(key + '][', i):
+                new_list.append((tup[0], tup[1]))
         return new_list
     else:
         # Base case. Return list with tuple containing the value

Combine Kwargs Alternating Nesting Dictionaries and Lists
Multiple users have reported issues with the [Create Quiz Question method](https://canvasapi.readthedocs.io/en/latest/quiz-ref.html#canvasapi.quiz.Quiz.create_question). In particular, the issue appears to be with the `question[answers]` parameter.

We originally diagnosed this as an issue with Canvas handling nested lists weird, but upon further inspection it looks like the issue actually lies with our implementation of `combine_kwargs`.

```
canvasapi_function(
    dict_list_dict={
        'key1': [
            {'subkey1a': 'value1a'},
            {'subkey1b': 'value1b'}
        ],
        'key2': [
            {'subkey2a': 'value2a'},
            {'subkey2b': 'value2b'}
        ]
    }
)
```

Given the above code, we would expect `combine_kwargs` to output the following:

```
dict_list_dict[key1][][subkey1a]=value1a
dict_list_dict[key1][][subkey1b]=value1b
dict_list_dict[key2][][subkey2a]=value2a
dict_list_dict[key2][][subkey2b]=value2b
```

However, it appears to actually be returning this (incorrect) response:
```
dict_list_dict[key1][subkey1a][]=value1a
dict_list_dict[key1][subkey1b][]=value1b
dict_list_dict[key2][subkey2a][]=value2a
dict_list_dict[key2][subkey2b][]=value2b
```
diff --git a/tests/test_util.py b/tests/test_util.py
index 6a9d835..caca94d 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -252,6 +252,25 @@ class TestUtil(unittest.TestCase):
         self.assertEqual(len(result), 1)
         self.assertIn(('big_dict[a][b][c][d][e]', 'We need to go deeper'), result)
 
+    def test_combine_kwargs_dict_list_dict(self, m):
+        result = combine_kwargs(
+            dict_list_dict={
+                'key1': [
+                    {'subkey1a': 'value1a'},
+                    {'subkey1b': 'value1b'}
+                ],
+                'key2': [
+                    {'subkey2a': ['value2a1', 'value2a2']}
+                ]
+            }
+        )
+        self.assertIsInstance(result, list)
+        self.assertEqual(len(result), 4)
+        self.assertIn(('dict_list_dict[key1][][subkey1a]', 'value1a'), result)
+        self.assertIn(('dict_list_dict[key1][][subkey1b]', 'value1b'), result)
+        self.assertIn(('dict_list_dict[key2][][subkey2a][]', 'value2a1'), result)
+        self.assertIn(('dict_list_dict[key2][][subkey2a][]', 'value2a2'), result)
+
     def test_combine_kwargs_the_gauntlet(self, m):
         result = combine_kwargs(
             foo='bar',
@@ -310,9 +329,19 @@ class TestUtil(unittest.TestCase):
             dict_list={
                 'key': ['item1', 'item2']
             },
+            dict_list_dict={
+                'key1': [
+                    {'subkey1a': 'value1a'},
+                    {'subkey1b': 'value1b'}
+                ],
+                'key2': [
+                    {'subkey2a': 'value2a'},
+                    {'subkey2b': 'value2b'}
+                ]
+            }
         )
         self.assertIsInstance(result, list)
-        self.assertEqual(len(result), 39)
+        self.assertEqual(len(result), 43)
 
         # Check that all keys were generated correctly
         self.assertIn(('foo', 'bar'), result)
@@ -354,6 +383,10 @@ class TestUtil(unittest.TestCase):
         self.assertIn(('generator[]', 'g3'), result)
         self.assertIn(('dict_list[key][]', 'item1'), result)
         self.assertIn(('dict_list[key][]', 'item2'), result)
+        self.assertIn(('dict_list_dict[key1][][subkey1a]', 'value1a'), result)
+        self.assertIn(('dict_list_dict[key1][][subkey1b]', 'value1b'), result)
+        self.assertIn(('dict_list_dict[key2][][subkey2a]', 'value2a'), result)
+        self.assertIn(('dict_list_dict[key2][][subkey2b]', 'value2b'), result)
 
         # Ensure list kwargs are in correct order
         self.assertTrue(

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio requests_mock
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/ucfopen/canvasapi.git@57292e47249857f63db60a0d5415c0797a918544#egg=canvasapi
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
exceptiongroup==1.2.2
execnet==2.1.1
idna==3.10
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
pytz==2025.2
requests==2.32.3
requests-mock==1.12.1
six==1.17.0
tomli==2.2.1
typing_extensions==4.13.0
urllib3==2.3.0

name: canvasapi
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - idna==3.10
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - pytz==2025.2
      - requests==2.32.3
      - requests-mock==1.12.1
      - six==1.17.0
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - urllib3==2.3.0
prefix: /opt/conda/envs/canvasapi

tests/test_util.py::TestUtil::test_combine_kwargs_dict_list_dict tests/test_util.py::TestUtil::test_combine_kwargs_the_gauntlet
tests/test_util.py::TestUtil::test_combine_kwargs_empty tests/test_util.py::TestUtil::test_combine_kwargs_multiple_dicts tests/test_util.py::TestUtil::test_combine_kwargs_multiple_mixed tests/test_util.py::TestUtil::test_combine_kwargs_multiple_nested_dicts tests/test_util.py::TestUtil::test_combine_kwargs_nested_dict tests/test_util.py::TestUtil::test_combine_kwargs_single tests/test_util.py::TestUtil::test_combine_kwargs_single_dict tests/test_util.py::TestUtil::test_combine_kwargs_single_generator_empty tests/test_util.py::TestUtil::test_combine_kwargs_single_generator_multiple_items tests/test_util.py::TestUtil::test_combine_kwargs_single_generator_single_item tests/test_util.py::TestUtil::test_combine_kwargs_single_list_empty tests/test_util.py::TestUtil::test_combine_kwargs_single_list_multiple_items tests/test_util.py::TestUtil::test_combine_kwargs_single_list_single_item tests/test_util.py::TestUtil::test_combine_kwargs_super_nested_dict tests/test_util.py::TestUtil::test_get_institution_url tests/test_util.py::TestUtil::test_is_multivalued_bool tests/test_util.py::TestUtil::test_is_multivalued_bytes tests/test_util.py::TestUtil::test_is_multivalued_chain tests/test_util.py::TestUtil::test_is_multivalued_dict tests/test_util.py::TestUtil::test_is_multivalued_dict_items tests/test_util.py::TestUtil::test_is_multivalued_dict_iter tests/test_util.py::TestUtil::test_is_multivalued_dict_keys tests/test_util.py::TestUtil::test_is_multivalued_dict_values tests/test_util.py::TestUtil::test_is_multivalued_generator_call tests/test_util.py::TestUtil::test_is_multivalued_generator_expr tests/test_util.py::TestUtil::test_is_multivalued_integer_types tests/test_util.py::TestUtil::test_is_multivalued_list tests/test_util.py::TestUtil::test_is_multivalued_list_iter tests/test_util.py::TestUtil::test_is_multivalued_set tests/test_util.py::TestUtil::test_is_multivalued_set_iter tests/test_util.py::TestUtil::test_is_multivalued_str tests/test_util.py::TestUtil::test_is_multivalued_tuple tests/test_util.py::TestUtil::test_is_multivalued_tuple_iter tests/test_util.py::TestUtil::test_is_multivalued_unicode tests/test_util.py::TestUtil::test_is_multivalued_zip tests/test_util.py::TestUtil::test_obj_or_id_int tests/test_util.py::TestUtil::test_obj_or_id_multiple_objs tests/test_util.py::TestUtil::test_obj_or_id_nonuser_self tests/test_util.py::TestUtil::test_obj_or_id_obj tests/test_util.py::TestUtil::test_obj_or_id_obj_no_id tests/test_util.py::TestUtil::test_obj_or_id_str_invalid tests/test_util.py::TestUtil::test_obj_or_id_str_valid tests/test_util.py::TestUtil::test_obj_or_id_user_self
canvasapi/util.py
canvasapi/util.py