I am trying to figure out the concepts behind Markov Chain.

```print zip(s,s[1:])
[('D', 'E'), ('E', 'F'), ('F', 'E'), ('E', 'E'), ('E', 'F'), ('F', 'H'), ('H', 'F')]```

How do I find the probability of the above data? Aug 2, 2019 45 views

## 1 answer to this question.

You have to use the tuples from the zip to index the dictionary and then multiply all the numbers.

```from operator import mul
print reduce(mul, (dict_m[t] for t in zip(s, s[1:])))``` answered Aug 2, 2019 by Ishaan

## Markov chain using processing - Python

Try something like this @Gujjar HashMap<String, int> wordCount; int ...READ MORE

## Python code for basic linear regression

Hi @Dipti, you could try something like ...READ MORE

## Python code for executing decision tree algorithm

Hey! Try this: # Run this program on ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

## how do i use the enumerate function inside a list?

can you give an example using a ...READ MORE

## Can you give LassoLars python example?

Hey @Vivek, Try something like this: >>> from ...READ MORE