psychopy_ext.exp.combinations — psychopy_ext 0.5.4 documentation
Author: Jonas Kubilius
Description: A framework for a rapid reproducible design, analysis and plotting of experiments in neuroscience and psychology

# psychopy_ext.exp.combinations

`psychopy_ext.exp.` `combinations`(iterable, r)

  Produces combinations of iterable elements of lenght r.

  Examples:
    - combinations(‘ABCD’, 2) –> AB AC AD BC BD CD
    - combinations(range(4), 3) –> 012 013 023 123

  From Python 2.6 docs under the Python Software Foundation License

  Args: | iterable A list-like or a str-like object that contains some elements r Number of elements in each ouput combination
  Returns: | A generator yielding combinations of lenght r